Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TNT4882 FIFOB Problem in 8-Bit mode

Hello all,
 
I've got a problem with the TNT4882.
 
We use it in 8-Bit-ISA mode connected to a Freescale HCS12.
It seems that I can read and write to all registers correctly,
except FIFOB. But I need FIFOB to transmit my Data.
 
Reading from FIFOB seems to work, as I already received some
Messages from the GPIB.
 
But if i write Data to FIFOB, it always transmitts 0xFF.
I found out, that FIFOB in this case is written with the Data-Lines
DATA15-8, which are not connected. But if I pull down one of these
Lines while writing to FIFOB, I get a 0xDF in this Register, for example.
 
I've attached a small program that shows this behaviour:
It just writes a Byte into the FIFO and read it back.
For this test, the TNT is not connected to the GPIB.
 
FIFOA can be written and read back correctly, but FIFOB always returns 0xFF.
As said before, receiving Data from the GPIB through FIFOB works.
The problem must be the write access to FIFOB.
 
Any ideas?
 
Thanks in advance!


Message Edited by ahm on 02-21-2008 04:30 AM
Download All
0 Kudos
Message 1 of 4
(3,842 Views)

Hello Ahm,

You should not expect to get the same value out of the FIFO that you put into it.  The FIFO is the kind of register whose contents is handled by the IEEE 488.2 state machine.  In the example you provided, you are setting CFG to 0x00.  This means that you are using 8 bit mode (as you already said), but it also means that you are writing to the FIFO and reading from it will not work correctly.  If you need to verify your physical connection to the TNT4882, try writing and then reading the CNT registers. 

On page 4-7 of the TNT4882 manual, it describes the way to perform a GPIB Data transfer (either direction).  There is also some example code that you can use (although your code is already quite similar in style).
http://joule.ni.com/nidu/cds/view/p/id/223/lang/en

You may want to include your transfer initiation code as well as the actual transfer code or you can more closely base your code on the above examples.

Steven T.

 

0 Kudos
Message 2 of 4
(3,810 Views)
Hello Steven,
 
thanks for your reply!
 
OK, I'v got another one. This program one is a bit more a "real world" program, but also more complex.
It can listen and talk (ok, not really talk) over a GPIB connection. There are only two devices on the
bus: The PC with PCI-GPIB and the TNT4882.
 
This is the "Interactive GPIB Control" output for talking from PC to TNT:
 
: ibdev 0 15 0 13 1 0
ud0: ibwrt "Hello TNT4882!"
[0100]   ( cmpl )
count:  14
ud0: ibonl 0
[0100]   ( cmpl )
 
I can also see the received string in the Watch-Window of my debugger.
I suppose, addressing, recognition of Listener Addressed and so on works.
 
No I reset Microcontroller and TNT an tested Listening to TNT:
 
: ibdev 0 15 0 13 1 0
ud1: ibrd 40
[2100]   ( end cmpl )
count:  12
ff  ff  ff  ff  ff  ff  ff  ff          . . . . . . . .
ff  ff  ff  ff                          . . . .
ud1: ibonl 0
[0100]   ( cmpl )
 
Again, the TNT recognized it's Talker state. It then transmitts the
correct count of characters, but the wrong data.
 
I can't understand what's going on here.
Any suggestions for further troubleshooting?
 
Thanks.
Download All
0 Kudos
Message 3 of 4
(3,805 Views)

No ideas?

 

0 Kudos
Message 4 of 4
(3,756 Views)