Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

tnt4882-inconsistent behaviour

hi
    I have interfaced the TNT4882 with a 8-bit microcontroller and the communication seemed to perfectly alright. i was able to send and receive data without any problem. but all of a sudden the device stopped responding to 'scan for instruments' under MAX. I assumed it to be a problem with the TNT4882 and changed it. the new TNT worked for a few days, before showing the same problem. what i have observed is, the controller asserts the ATN line when i scan for devices, but the LA bit in the ADSR register of the TNT is always low (ADSR reads 0x00 during this time). i have gone thru various steps in this post . i was able to write to the count registers and the address register and read back the correct values. the only problem seemed to be with register at offset 0x04. this register always gives 0 when its read.
i have initialised the TNT under one-chip mode and used normal dual addressing (as in TNT programmer's ref. manual)

can anyone help me resolve this issue.

thanks.

0 Kudos
Message 1 of 12
(4,405 Views)
The ADSR is at offset 0x8, not 0x4. ISR2 is at 0x4.
0 Kudos
Message 2 of 12
(4,391 Views)
hi collin,
             i have accessed ADSR at offset 0x08 and have not used any interrupts. while i was checking if i can read the registers correclty, i have noticed that the ISR2 at offset 0x04 always reads 0x00. the ADSR normally reads 0x40 and when i perform scan for instruments from max it reads 0x00 which indiates that the ATN line is asserted but the device has not been set as a listener.
             i have followed the initialisation procedure listed in the TNT programmers' ref. manual, but i am not sure if i am missing something. NRFD and NDAC lines remain unasseted during 'scan for instruments'.

thanks.
0 Kudos
Message 3 of 12
(4,381 Views)
During scan for instruments each device is addressed to listen only for a very short amount of time, usually a few milliseconds. During a scan for instruments sends a listen address, then sends the unlisten command, then sends a different listen address, and continues that pattern. After sending a listen address it detects if there is a device responding at that address. After a scan for instruments it is reasonable that the ADSR is 0x00.

Some bits in ISR2 are cleared when read unless AUXRI[SISB] is set. Is it possible that your firmware is detecting an interrupt and handling it before you read ISR2?

Are you experiencing any errors in your setup or are you just questioning the register values?
0 Kudos
Message 4 of 12
(4,362 Views)
hi collin,
     i am experiencing a few difficulties in my setup.

1. 'scan for instruments' doesn't detect my device anymore.
2. the LA bit in ADSR always remains 0 and hence the device is never set as listener.
3. the ATN line is asserted during 'scan for instruments', but the NRFD and NDAC lines remain unasserted.
4. in ibic when i have typed "ibfind gpib0", followed by "ibsic" and then "ibcmd 0x23" (primary address is 4 and 0x24 is MLA4 command), i have         received ENOL error.
is this a problem in accessing the registers or can i do something else to check if i am not missing anything.

thanks.
0 Kudos
Message 5 of 12
(4,351 Views)
Reading your original post, it sounds as though everything was working fine, and then stopped working, is that correct? Was anything at all (cables, firmware, driver version) changed between it working and not working?

As I said in my previous post, during a scan for instruments the TNT4882 will only be addresses to listen for a few milliseconds. It is unlikely you would be able to read the ADSR at precisely the time the TNT4882 is addressed to listen.

Can you post a copy of your schematic?


0 Kudos
Message 6 of 12
(4,351 Views)
hi collin,
     thanks for your reply.
the device was working fine but now it has stopped working. nothing has been changed in the firmware and the cables are working fine (i have checked the cables with a GPIB multimeter).
i have used "External memory interface' feature of my 8051 microcontroller to interface the TNT4882.  in my main() function i am continuously reading the ADSR to check if the TNT4882 has been set as a listener or talker. the ADSR always reads 0 when i perform 'scan for instruments' (earlier it used to read 0x04 during 'scan for instruments', when the device was working).

i am posting a copy of my initialisation routine and schematic.

thanks
Download All
0 Kudos
Message 7 of 12
(4,333 Views)
Can you double check the soldering of the TNT4882 and GPIB connector?

The experiment you did with ibic was good. When you got the ENOL error it inidicated the host did not detect any other devices on the GPIB. That is a fundamental error and could be caused by the chip being in reset, not powered on, cable not connected, intermittent solder connection, and so on.

Pon does need to be cleared in the TNT4882 so if your firmware was not being executed for some reason the TNT4882 would not be detected.
0 Kudos
Message 8 of 12
(4,315 Views)
hi collin,
    i have checked all the connections on the TNT and the GPIB connector and everything is fine. i have replaced the TNT and the new TNT is being set as a talker and listener and i am able to send and recieve data.
    i am not sure why the old TNT has stopped functioning as a talker or lister. i was able to access its registers without any problem. is it normal that we can access the TNT registers correctly, without the TNT actually being set as a listener or talker.
i had this problem a couple of times and when i replace the TNT the device works well. can i do something to overcome this problem.

thanks!!
0 Kudos
Message 9 of 12
(4,296 Views)
I have never heard of that problem before. It is like the TNT wasn't detecting the GPIB signals correctly. If you wanted to troubleshoot further with the bad TNT you could assert each GPIB signal from the host and see if you could read the state of the signalin the BSR/DSR. I think that would reveal the problem.
0 Kudos
Message 10 of 12
(4,287 Views)