From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

SOS! TNT488 problems

Hello! I am sorry English is not my mother tongue!
I use TNT4882 chip for GPIB support implementation and AT89S52 for control. I use generic pin configuration to access TNT4882-AQ. The tnt not seems to work. I do not know if the problem is hardware or software problems. Who can help me? You can see the pin configuration on the attachment.Here is the initialization code:
void main(void)
{
   MCU_Init();
   TNT_RST = 0;
   delay();
   TNT_RST = 1;
   delay();

   CMDR = 0x22; //soft reset
   SPMR = 0x80; //place chip in turbo+7210 mode
   AUXMR = 0x80;
   SPMR = 0x99;
   AUXMR = 0x99;
   KEYREG = 0x00; //0x00 to KEYREG
   HSSEL = 0x01; //put in one-chip mode
   AUXMR = 0x02; //assert local pon message
   ADMR = 0x31; //dual primary addressing mode
   ADR = 0x01; //set primary GPIB address as 1
   ADR = 0xE0; //disable secondary address
   AUXMR = 0x00; //clear local power-on message
 
 SBUF = XBYTE[0x00];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x01];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x02];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x03];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x04];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x05];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x06];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x07];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x08];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x09];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x0A];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x0B];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x0C];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x0D];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x0E];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x0F];
 while (!TI);
 TI = 0;

    SBUF = XBYTE[0x10];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x11];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x12];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x13];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x14];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x15];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x16];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x17];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x18];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x19];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x1A];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x1B];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x1C];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x1D];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x1E];
 while (!TI);
 TI = 0;

 SBUF = XBYTE[0x1F];
 while (!TI);
 TI = 0;

 while (1);
}

Here is the data which i read from all TNT4882 registers after the initialization,  somebody can see wrong values?
Reg: 0x00  -> Val: 0x00
Reg: 0x01  -> Val: 0xFF
Reg: 0x02  -> Val: 0x00
Reg: 0x03  -> Val: 0xFF
Reg: 0x04  -> Val: 0x00
Reg: 0x05  -> Val: 0xFF
Reg: 0x06  -> Val: 0x00
Reg: 0x07  -> Val: 0xFF
Reg: 0x08  -> Val: 0x00
Reg: 0x09  -> Val: 0xFF
Reg: 0x0A  -> Val: 0x00
Reg: 0x0B  -> Val: 0xFF
Reg: 0x0C  -> Val: 0x00
Reg: 0x0D  -> Val: 0xFF
Reg: 0x0E  -> Val: 0x00
Reg: 0x0F  -> Val: 0xFF
Reg: 0x10  -> Val: 0x00
Reg: 0x11  -> Val: 0x00
Reg: 0x12  -> Val: 0x00
Reg: 0x13  -> Val: 0x00
Reg: 0x14  -> Val: 0xFF
Reg: 0x15  -> Val: 0x3C
Reg: 0x16  -> Val: 0xFF
Reg: 0x17  -> Val: 0x3C
Reg: 0x18  -> Val: 0x19
Reg: 0x19  -> Val: 0x00
Reg: 0x1A  -> Val: 0x19
Reg: 0x1B  -> Val: 0x00
Reg: 0x1C  -> Val: 0x00
Reg: 0x1D  -> Val: 0x00
Reg: 0x1E  -> Val: 0x00
Reg: 0x1F  -> Val: 0x00
 
Through those values,it simply does not work. I suspect my TNT4882 bad. Thinks!

I am sorry you and our little forum, I am not accustomed to.I am very slow speed of the network, publish this post I spent several hours.Annex I have not uploaded successfully, so I re-issued a message. My English is really good bad, I am sorry!

0 Kudos
Message 1 of 3
(2,989 Views)
0X0C to see this address it, I obviously changed 0X01, but now read out or 0x00, obviously wrong ah, but I if not a direct reading and processing of the initial initialization code to read the value is not The same. That is to say after the initial part of the register value is changed, but I did not request changes, but is not random change. Initialization code plus the value has been fixed as the Very stable. Initialization and the slightly changed to read out the values will change, it seems that it can read and write, is not up to my request. I was the chip I still have the problem? Circuit problems ah »procedure should be no problem, because in full accordance with the data to write the manual. Crystal do not know have any questions« I use the 40M active crystal, but can not read by oscilloscope 40M, only 39M Around, I do not know have any impact on .Thinks!
0 Kudos
Message 2 of 3
(2,980 Views)
I am sorry because my English really bad, so the above is not fluent, and also a bit I can not express
the meaning, re-edit the next.

That we see the address of 0X0C, I obviously changed 0X01, but now read out or 0x00, obviously wrong,
but if I not a direct reading and processing of the initial initialization code to read the value is
not The same. That is to say after the initial part of the register value is changed, But it is not in
accordance with what I mean to change, not the values I want to. But is not random change also,
Initialization code plus the value has been fixed as the Very stable. If I changed Initialization code
slightly changed, there will be changes in the value, it seems that it can read and write, but the vaule is not I need. In the end is hardware or software problem? problem should be no
problem? because in full accordance with the data to write the manual. Crystal do not know have any
questions? I use the 40M active crystal, but can not read by oscilloscope 40M, only 39M Around, I do
not know have any impact on .Thinks!
0 Kudos
Message 3 of 3
(2,974 Views)