Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NAT 7210 programming

Hello,
I would like to use the NAT7210 IC with a microcontroller to interact with the GPIB bus. After reading the documentation on the NI web site (such as the "7210 reference manual", "Design GPIB device with 9914", ...), I got a clear (more or less) idea about how to send or receive data (what to write or read form the 7210 registers). However I have concept doubts. How does the 7210 handle the received command or data messages? For instance, if another device is sending an "*IDN?" message, does the 7210 inform somehow to the micro that the bytes are being received or does the 7210 process the GPIB message by itself and sends some kind of info to the micro? Where can I find the information about the IEEE488.1 and IEEE488.2 standard commands?
Is there anywhere a clear example about this? Any information will be welcome. Thank you in advance.
0 Kudos
Message 1 of 7
(4,033 Views)
Whenever the NAT7210 receives a data byte it enters into a holdoff state and asserts the DI bit in ISR1. This will cause the NAT7210 interrupt pin to assert if the DI IE bit is set in IMR1. When the NAT7210 is in a holdoff state it will not accept any more data bytes. To clear the holdoff, read the DIR to get the last byte received. Reading the DIR will also clear the DI bit in ISR1.
Message 2 of 7
(4,033 Views)
Thank you very much for your quick answer, dittohead. I had read this about the holdoff and so on in the 7210 reference manual. However, what was confusing me (and I don't have clear yet), is what it is mentioned on this manual about the compatibility with the 488.1 and 488.2 standards of the NAT7210. If the micro which is managing the 7210 is the one that has to interpret the GPIB messages, which is the meaning of being .1 or .2 compatible?
So to say, then all the processing job has to be done by the micro, is it right? For example, for the "*IDN?" command would be the sequence as follows?
-the NAT7210 captures first a "*" and generates an interruption and the holdoff.
-the micro reads the DIR register and the holdoff is released.
-the next byte ("I") is se
nt and captured by the NAT7210...
...and the story goes on, until the EOS (or EOI) is received, and then the micro proceeds accordingly. Would it be like this?
Sorry to ask you for a so a simple question, but I am just starting with this. By the way, do you know where is possible to get detailed info about the IEEE488.1 and IEEE488.2?
Thank you once again for your answer.
0 Kudos
Message 3 of 7
(4,033 Views)
Yes, the transfer will take place according to you description. The NAT7210 does not interpret any data bytes, only command bytes.

The 488.1 standard describes the electrical layer and the GPIB state machines such as talker, listener, controller, etc. The 488.2 standard describes the firmware implementation to make a 488.2 compliant device.

The only source I know of for the two standards is through the IEEE.

NI does sell a software package called NI-Device that is used for developing firmware for IEEE 488.2-compatible instruments, but this software will only work with the TNT4882 or TNT5002.
0 Kudos
Message 4 of 7
(4,033 Views)
Excellent answer, dittohead.

Just wanted to add that IEEE is the only source for the 488.1 and .2 standards. It's possible to complete a project without having the standards handy, but it does clarify some things if you order them from IEEE.

Scott B.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 7
(4,033 Views)
I just wanted to thank both of you (dittohead and ScottieB) for your replies. They have been very useful for me.
Thank you.
0 Kudos
Message 6 of 7
(4,033 Views)
I just wanted to thank both of you (dittohead and ScottieB) for your replies. They have been very useful for me.
Thank you.
0 Kudos
Message 7 of 7
(4,033 Views)