‎11-16-2006 10:57 AM
Ok,
Thanks Mr Collin
‎11-17-2006 08:12 AM
Mr Collin,
hast you found some thing??
‎11-17-2006 08:59 AM
Mr Collin,
hast you found some thing?
Thanks,
‎11-17-2006 04:11 PM
‎11-22-2006 10:20 AM
‎11-22-2006 02:00 PM
‎11-23-2006 08:57 AM
‎11-23-2006 10:31 AM
‎11-23-2006 06:50 PM
‎11-24-2006 08:51 AM
I am using the two maual.
i have changed my code , and he still not work correctly here are the code
1) Gpib_send(char *S, int cnt) // Send data to the bus when address als talk
{
WriteGpib(0x09, CFG);// Configure Chip for sending data
WriteGpib((char)(cnt), CNT0);// Number of byte to be send
WriteGpib(0x00, CNT1);
WriteGpib(0x00, CNT2);
WriteGpib(0x00, CNT3);
WriteGpib(RstFIFO,CMDR);// Reset the fifo
// Interrupt
WriteGpib(E_ERR, IMR1); // detect error condition
for(i=0; i<7;i++)
{
WriteGpib(S[i], FIFOA); // write data to the bus
WriteGpib(GO, CMDR); // commando Go to start the trandfert
}
WriteGpib(STOP, CMDR);// stop the transfert
WriteGpib(CLrADSC, AUXMR);// clear adress statut
}
2)char Gpib_Receive1(int cnt)// receive data from the bus
{
int i;
int a;
char Gpib_buffer1[16];
a = 0;
i=0;
// Init Data Transfert
WriteGpib(RstFIFO,CMDR);
WriteGpib(0x21, CFG);// Configure the chip for gpib Data transfert
// Number of byte to be read
WriteGpib((char)(cnt), CNT0);
WriteGpib(0x00, CNT1);
WriteGpib(0x00, CNT2);
WriteGpib(0x00, CNT3);
// end os string chararacter
WriteGpib(0x0D, EOSR);
WriteGpib(0x16, AUXRA);
WriteGpib(RHDF, AUXMR);
WriteGpib(GO, CMDR);
for(i=0; i<16;i++)
{
Gpib_buffer1[a] = ReadGpib(FIFOA);
++a;
RSendChar(LF); // GpibData2 Receive über Rs232
RSendChar(ReadGpib(FIFOA));// read data that i get from the bus
RSendChar(LF);
}
// Interrupt
(E_END, IMR1);
(E_TO_IE|E_NLEN , IMR0);
WriteGpib(E_TLCINT | E_DONE| E_NEF, IMR3);
WriteGpib(STOP, CMDR);
return Gpib_buffer1;
}
3) i have some probleme
- My litener address geve me 0x44 it is okay? // when i make a ibwrt to the device i read ADSR=0x44
-My Talk address give me 0x4A it is okay?
- when i make a ibrd or ibwrt i alwas get ISR2=0x10, although i have set the more bit in IMR2 register by the initialize// WriteGpib(E_ADSC, IMR2);
-when i make a ibrd or ibwrt some time he work and somme time i get a error
-how can i read data from the fifo, i write this sequenz to read data form the fifo and i always read 0x00
for(i=0; i<16;i++)
{
Gpib_buffer1[a] = ReadGpib(FIFOA);
++a;
RSendChar(LF); // GpibData2 Receive über Rs232
RSendChar(ReadGpib(FIFOA));
RSendChar(LF);
}
Thanks...