I'm developing driver for GPIB device TNT4882. I'm working at One Chip mode with ISA connection. I can read and write to all registers, but I have some problems/questions (see below).
1) I connected the TNT4882 to the PC with GPIB cable. I tried to use Measurement & Automation Explorer to communicate with the instrument, but no instrument was found during "Scan for instruments". We saw IFC, ATN, NDAC and Data GPIB bus lines changes during the scan. Nothing also arrived at TNT4882's FIFO. Can you please give me more information how PC discovering new devices and what should be done by the driver in order to allow to PC establish communication. May be I'm missing some timer configuration?
2) I performed Interrupt Test (as was suggested at NI's Application Note 095). I saw that all registers change their values exactly as they supposed to do (including SRS3 NEF bit) , but the INT pin didn't change to 1 and as a result I didn't have an interrupt.
3) I performed BSR & DCR Test (as was suggested at NI's Application Note 095). I wrote values to the registers, but read the entire tome 0's instead of written values. Does it OK?
4) I read 0 at CSR register. According to Application Notes the high byte shoul be 0011. I saw at one of your examples that if I get 0 it's mean that I'm using NEC7210 chip (and we indeed use 7210 mode), but it is not supported. Can you please explain a little more what exactly not supported?
5) I performed read/write simulation (wrote "hello" to FIFO and then read it back). I wrote two's complement of 5 to the CNT0, but the value didn't change during writing operation nor during reading operation. Does it OK? Should counter register change only when it read by controller or CPU?
6) According to Application Notes, I can't use CDOR/DIR registers at One Chip mode. Is it correct?
Interrupt Test
nSetVal = 0x1;
nRegister = INTR;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//Enable ISA interrupts by writing to INTR
nSetVal = 0x00;
nRegister = IMR0;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//clear IMR0
nRegister = IMR1;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//clear IMR1
nRegister = IMR2;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//clear IMR2
nRegister = IMR3;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//clear IMR3
nRegister = CMDR;
nSetVal = 0x10;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//clear FIFO
nRegister = ISR3;
bRet= m_GPIBdrv.GetGPIBHandle()->ReadRegister(nRegister, &nRetVal);//Read ISR3
nRegister = IMR3;
nSetVal = 0x4;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//Enable NEF IE
nRegister = FIFOB;
nSetVal = 0xaa;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//Write 0xAA to FIFOB
nSetVal = 0x55;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//Write 0x55 to FIFOB
nSetVal = 0x18;
bRet = m_GPIBdrv.GetGPIBHandle()->WriteRegister(nRegister, nSetVal);//Write 0x18 to FIFOB
nRegister = ISR3;
bRet= m_GPIBdrv.GetGPIBHandle()->ReadRegister(nRegister, &nRetVal); //Read ISR3
Best Regards
Alex Volkov
Software Engineer
Sysmop Technologies Ltd.
Tel: +972-4-9935088
Fax: +972-4-9937059
e-mail: alex@Sysmop.com