Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

tnt4882 in 9914 Mode Not Changing Address

HI,
We are using a TNT488 in 9914 mode and I have discovered some odd behavior.
 
Set the address of the bus to 18 and everything communicates fine. If I then change the address to say 22, then the chip contiues to respond to commands sent to address 18. As soon as I get the chip to talk, then it responds to address 22.
 
The chip is set up with:
 
 IOWriteByte( CMDR_ADDR, SOFT_RESET );
 IOWriteByte( KEYREG_ADDR, SET_9914_MODE );
 IOWriteByte( AUXMR_ADDR, SET_9914_CMD );
 IOWriteByte( AUXCR_ADDR, SET_SWRST_CMD );
 IOWriteByte( ADR_ADDR, uAddress );

 // Set the interrupt masks to allow interupts we are interested in.
 m_uMask0 = (BYTE_O | BYTE_I | RLC);
 m_uMask1 = (DCAS | GETR);
 
 IOWriteByte( ISR0_ADDR, m_uMask0 ); 
 IOWriteByte( ISR1_ADDR, m_uMask1 );
 IOWriteByte( IMR2_ADDR, 0x00 );
 
 MavClear();         
 // Prepare to go...
 IOWriteByte( AUXCR_ADDR, CLEAR_SWRST_CMD );
 IOWriteByte( CMDR_ADDR, GO_CMD );
 
 
And I change address by simply writting to the ADR register:
 IOWriteByte( ADR_ADDR, uAddress );

Any ideas?
0 Kudos
Message 1 of 3
(3,239 Views)
Are you re-addressing the bus after changing the GPIB address of the TNT4882? If you don't readress the bus then changing the address will have no effect. The GPIB address programmed through the ADR is only compared when a GPIB addresssing command is sent.

Also, changing the GPIB address is not typically done in a functional system as part of normal operation. Are you trying to implement more than one logical device in the same physical device?
0 Kudos
Message 2 of 3
(3,235 Views)

Thanks for the reply. It would seem that the device was not being unlistend after I had change the address and thus appeared not have changed address. And now you say it, it makes sense!

 

This came to light because another bug in my code had meant that the bus address stored in NV ram was not being written to the chip after power up, so the chip had the default address that we use.

Indeed I would not expect the address to change during normal operation. This was found as part of the testing...

Thanks for your help.

0 Kudos
Message 3 of 3
(3,215 Views)