LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure a bi-directional port and read/write from it in DIO-96 card

Hi,

I am using DIO-96 card and new to LABWindows, I would like to ask a question:

How can I configure an 8 line port to be bi-directional in MAX and perform write to all 8 lines and read them from the same port? I tried a few samples using MAX but only able to config it to write but when read back I get all signals as high.

Thanks,
V.
0 Kudos
Message 1 of 4
(3,232 Views)
Hi,

The following knowledge bases describe how to perform bidirectional operations using the device.

Understanding the Bi-Directional Mode of 8255 Chip:

http://digital.ni.com/public.nsf/websearch/F865C1157622C9DE8625648B00782CDA?OpenDocument

How Do I Use Bidirectional Mode with an 8255 DIO Chip?:

http://digital.ni.com/public.nsf/websearch/92582BD25EE97F8D85256442005968C9?OpenDocument

Hope that helps. Have a good day.

George
0 Kudos
Message 2 of 4
(3,210 Views)
Thanks George, I appreciate your help, however I was looking for ways to accomplish this in LABWindows's DAQ Assistant utility. I think that this utility doesn't offer direct controls of the handskaing lines STB* (PC4) and ACK* (PC6).

What I want to do is to read and write from the same port, not at the same time but at seperate times, so far I have not been able to find any example using DAQ Assistant.

What I have been able to do via creating write and read tasks using DAQ Assistant is to write to port 0 and read from port 1, where port 1 is direct wired from port 0, then I got desired results. But when I configure port 0 for read, all lines are reset to high, and therefore I read all highs.
0 Kudos
Message 3 of 4
(3,193 Views)
In your code make sure you reconfigure the IO port for read in your code. Here is an example,

Configure port for write
Write date
Configure port for read
Read data


You may need a pull up or pull down resistor to keep the read port from floating high
0 Kudos
Message 4 of 4
(3,185 Views)