02-22-2006 11:33 AM
02-23-2006 11:06 AM
There's no concept of a "buffer" in the 7210...You just read from the CDOR a byte at a time. Unless you're doing DMA, in which case you would see the data in memory all at once. So I'm confused by your use fo the term "buffer". Are you using DMA? Or is this some internal software buffer?
You should be able to tell pretty easily which PAD has been addressed as a listener by examining the MJMN bit in the ADSR prior to reading each byte. Are you doing this? When?
Scott B.
GPIB Software
02-23-2006 11:22 AM
hi
Maybe I did not explain my self good enough.
The buffers are SW buffers and we made 2 buffers one for "Minor" primary and one for "Major" primary.
When we receive interrupt from the NAT7210 we first look at the MJMN bit to determine which address we need to serve.
When the messages are coming from the same address everything works OK . but when we do a read from the "Minor" and the next read is from the "Major" the first byte is sent from the "Minor" buffer and then we receive the rest of the "Major" buffer as we expected. the problem is the first byte that comes from the wrong address (buffer).
It is like the NAT7210 changes the MJMN bit only after the first interrupt.
02-24-2006 09:43 AM
02-24-2006 10:28 AM
I see what Collin is saying, but I think I confused the matter by talking about the CDOR. In fact, we're talking about the CDIR, right? Because this is when the NAT is receiving data from the GPIB?
I think this is what you're doing, please correct me if I'm wrong:
-You setup dual addressing at, say, PAD 4 and PAD 5.
-Your controller begins to write "ABCD" to PAD 4
-You do a read of the MJMN bit and see that it's the Major addressed as a listener. You read the CDIR and get A, B, C, D.
-Your controller now writes EFGH to PAD 5.
-You read MJMN, see that the Minor address is listening, and read the CDIR 4 times to see E, F, G, H.
At what point are things messing up and going awry?
Scott B.
GPIB Software
02-25-2006 11:23 PM
hi
the problem is from the device to the controller so CDOR is the right term
Rona
02-25-2006 11:41 PM - edited 02-25-2006 11:41 PM
I do not think that I send more data.then i need
My interupt code for the minor output is:
if (Results_buffer_out_counter < Results_buffer_in_counter)
{
temp = Results_buffer[Results_buffer_out_counter]; /* get the character to send */
if (temp == LF) /* see if it's the end of message */
{
send_eoi(); /* send EOI if end of message */
}
CDOR = temp; /* send the byte of data */
Results_buffer_out_counter++; /* inc. the pointer */
}
Line feed is the last byte I think I send, it is the last byte of my message.The next byte is the problem. If after message is received at the controller, the controlleri changes from Minor to Major, the Major answer contains the first byte of the next minor message and then the Major real answer attached.
like id the Minor always sends ABCD and the Major EFGH it will look like:
ABCD,CR,LF (Minor)
AEFGH,CR,LF (Major)
BCD,CR,LF (Minor again....)
and so on....
Rona
Message Edited by Rona on 02-25-2006 11:42 PM
02-27-2006 07:14 AM
02-27-2006 07:19 AM
Hi
This can be the problem...
Is there a way to detect this interrupt and seperate it from data request interrupt?
Rona
02-27-2006 07:26 AM