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: 

NAT9914 and PIC host device, Problem reading registers.

I am working on a device as a student at Portland State University, and we are using a PIC microcontroller as the host interface. We can initilize the 9914 correctly and using a PCMCIA-GPIB card and NI's interactive control tool, detect it as a listener and successfully send it 1 byte of data. After this it appears to us that the 9914 "freezes". We have used a logic analyzer to watch the events on the bus side as the data is sent to the 9914. The process goes like this.

1. ATN is asserted high.
2. EOI is asserted low.
3. The data is placed on DIO8 - DIO1, (Active Low).
4. NDAV and DAV are asserted low.
5. NRFD is asserted high.
6. NRFD is asserted low, and DAV is asserted high.
7. EOI is asserte
d high.

The problem comes in when we try to read the contents if ISR0 to see if there is data in the DIR (BI bit). The register never shows that the BI bit sets. We have used a logic analyzer to watch as the address is placed on RS2 - RS0, and as the DBIN pin is asserted high.

We cannot send multiple bytes of data to the 9914, the device times out if we try sending more than 1 byte at once, also the device has to be re-initilized once a byte has been sent, before we can successfully send it another byte.

We have tied CE pin on the 9914 to ground, hopefully this does not cause a problem for reading registers. It does not appear to for writing to registers.

We are also wondering if there is a readable register in the 9914 that by default has a value other that 0x00 so we can test our read register routine.

Also when the IFC line is asserted low by the CIC what does the 9914 do? What does the host need to do if anything?

Any suggestions about what may be going on
or what to test in order to find out would be greatly appreciated.

Rick Dyer
ECE, Portland State University
0 Kudos
Message 1 of 2
(3,373 Views)
There is an application note, AN110, that discusses creating a device using the NAT9914. The application note contains source code (or at least pseudo-source code) that goes through a test routine to verify that the NAT9914 is connected correctly. You can access this application note though the link below.

http://digital.ni.com/devzone/conceptd.nsf/webmain/40D4BB8DCD8CEB35862568040069E228?OpenDocument

Hopefully this will help you get started.

The IFC line should cause the NAT9914 to transition its talker and listener state machines to the idle state, effectively terminating communication on the bus. It should not really have much other side affects.
0 Kudos
Message 2 of 2
(3,373 Views)