05-12-2009 06:51 AM
05-12-2009 08:39 AM
05-12-2009 10:10 AM
Hello,
There is a source code package that can be used to get the TNT4882 to respond to queries such as *IDN?. There are two versions, one that uses interrupts and one that does not. If you trace the function calls down to the lowest levels, you will see that the TNT4882 registers are being accessed by Memory IO functions.
I would recommend spending some time going over the code and correslating the function names with the register accesses made (using the TNT4882 manual).
http://joule.ni.com/nidu/cds/view/p/id/223/lang/en
I hope this helps,
Steven T.
05-12-2009 10:27 PM
My microcontroller is communicating with 4882. we want to use labview to communicate with the tnt4882 from pc end. is there any application code available also primary address of the device is being identified but is not responding to *idn query
05-12-2009 10:55 PM
05-13-2009 12:24 AM
Hey Dennis,
I understand what you are trying to say. It would be helpful if you pointed me to the documents that would tell me what configuration the TNT4882 should be put to inorder to have it communicate with VISA.
This is what I have done...
void TNT_config(void){
XBYTE[CMDR] = 0x22; //soft reset command to command register
XBYTE[SPMR] = 0x80; //following steps configure the TNT into turbo+7210 mode
XBYTE[AUXMR]= 0x80; // do
XBYTE[SPMR]= 0x99; // do
XBYTE[AUXMR]= 0x99; // do
XBYTE[HSSEL] = 0x01; //Configure TNT to one chip mode
XBYTE[AUXMR]= 0x02; //To make sure that the local PON message is asserted.
// to logically disconnect the GPIB and GPIB interface
//Configure the TNT for GPIB operation
XBYTE[ADMR]= 0x31; //To set the TNT in dual primary addressing mode.
XBYTE[ADR]= 0x0A; //The primary address of the built GPIB card as seen by the MAX
XBYTE[ADR]= 0xE0; //TNT has no secondary address
XBYTE[AUXMR] = 0x51; //hold off handshake immediately
XBYTE[SPMR]= 0x01; //Initial serial poll response byte
//Enable interrupts
XBYTE[IMR0] = 0xAD;
XBYTE[IMR1] = 0x00;
XBYTE[IMR2] = 0x00;
XBYTE[IMR3] = 0x08;
XBYTE[HIER] = 0xC0; //To select deglitching circuit on the TNT
XBYTE[AUXMR]= 0x00; //To clear the local PON message
return;
}
Max is reading the address as 10. we want to confiqure tnt as a listener.so do we have to write the address as 2A instead of 0A in ADR register?
05-13-2009 08:34 AM
Devika,
I don't think that you understand how invovled your question is. Getting your instrument to respond to the *IDN? query is quite complicated. However, we know that your TNT4882 is initialized correctly because it is showing up in MAX when you scan for instruments. This means that you have successfully followed the directions in Chapter 4 of the TNT4882 Programmer Reference Manual.
Here are the additional steps necessary for communication (both sending and receiving data):
Depending on how you are using the chip, there are numerous ways to implement these steps. With a DMA transfer (over an ISA bus), with interrupts, or even using a timer for timeout detection. Once you decide which features of the TNT4882 you want to use, you can see the manual for tips on implementation or you can see the source code package that I directed you to. It is an actual implementation of an instrument responding to a *IDN? query.
The code that you posted will only get the instrument to respond to addressing by the controller. It will not allow it to actually communicate.
I hope this helps,
Steven T.