Problem with digital I/O port of a DAQ card 
Author Message
 Problem with digital I/O port of a DAQ card

Hi,

I've been trying to write a labview program to control a t6963c LCD
controller using DAQCard-AO-2DC. I need one 8-bit bidirectional data
port and 6 bits output lines for control signals. Therefore, I set
port A (PA) of the DAQCard as bidirectional data bus, and port B (PB)
as output for control lines.
An example write/read operation of the ports (O,C: write,I: read) is,
PA: O1 O2 I1 O3 O4 I2 ...
PB: C1 C1 C2 C3 C3 C4 ...

The problem is that if I use port_config, port_write, port_read VI's,
there is confliction in PA (Error code -10612, badLineDirError). I
could only read from PA, but could not write. The output of PA is
always 0. I found some statement from
http://www.*-*-*.com/ , saying

"When Other Digital Ports Might Be Reset
        Nearly all cards with multiple digital ports use the Intel 8255 chip,
used in PC parallel ports. When you read from a port for the first
time, or after having used it to write, any other port outputs will be
reset. An easy way to avoid this problem is to use a given port for
either reading or writing, but not both, and to do your first read
before your first write."

DAQCard-AO-2DC uses 8255. Does it mean that we cannot use it as a
bidirectional port? How to understand this statement?

My questions are:
1. First of all, is it viable to use DAQCard-Ao-2DC to reach the
target?
2. Can I use port_config/read/write to program?
3. Is there a way to make the output PA and PB change at the same
time? I used dio_read/write. PA, PB changed one after another and the
speed was too slow (one operation takes ~ms).

I appreciate your help.

Dexter



Sat, 05 Mar 2005 02:37:58 GMT  
 Problem with digital I/O port of a DAQ card
With digital I/O using the 8255, you cannot configure individual line
direction. All pins of a single port must be either input or output.
You'll need to find another DAQ card. I believe that the E series
devices have digital I/O programmable on a line basis.


Sat, 05 Mar 2005 04:35:01 GMT  
 Problem with digital I/O port of a DAQ card
Hello;

You can set certain ports to be bidirectional. Note that these are
ports from the 8255 chip. Double check on the DAQ device Users Manual
what ports can be set as bidirectional mode.

There are other boards I would recommend that allow you to configure
bidirectional operations, such as the DIO-24 and the DIO-96.

Perhaps you actually want individually configurable lines in a port,
which the 8255 chip does not allow. In that case, the PCI-6025E does
allow you to choose some lines as input and some as output in the same
port. That would be calling the Dig_Line_Config functions for the
appropriate lines.

Hope this helps.
Filipe A.
Applications Engineer
National Instruments



Sat, 05 Mar 2005 22:57:17 GMT  
 Problem with digital I/O port of a DAQ card
Thanks, Dennis.

What I want to configure is the port, not individual line. I tried to
use Port Write / Port Read to make the port A bidirectional. However,
I found that Port Read only read back what Port Write has written.
Therefore, I cannot read data from outside the DAQ card.

Is there a way to configure the port as bidirectional?

Quote:

> With digital I/O using the 8255, you cannot configure individual line
> direction. All pins of a single port must be either input or output.
> You'll need to find another DAQ card. I believe that the E series
> devices have digital I/O programmable on a line basis.



Sun, 06 Mar 2005 04:32:20 GMT  
 Problem with digital I/O port of a DAQ card
hi Filipe,

Thanks for the answer.

Acutally, I want to set port A to be bidirectional bus. For DIO-24,
port A can be set as such in Mode 2. However, I don't see in the
manual of DAQCard-AO-2DC saying any word about bidirectional bus,
although it says that PA and PB are "bidirectional digital data
lines". The ports in AO-2DC can be set as either input or output. But
cannot be programmed to be working in mode 2.

So my guess is that, for AO-2DC I have to reconfigure the port A
whenever the direction of the data flow is changed but that will reset
the port B. I'm afraid my initial thought won't be relized by using
AO-2DC.

Regards,

Dexter



Sun, 06 Mar 2005 05:42:44 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. FA: National Instruments PCI-5102 Digital Oscilloscope and PCI-6071E Multi-I/O DAQ cards

2. Hardware timed digital I/O on DAQ card ?

3. Problems running an application with non NI DAQ cards

4. Problems running an application with non NI DAQ cards

5. Problems with LPT-port on new IO cards

6. Port I/O through serial port on sound card

7. Free DAQ software for Sound Cards

8. daq-card

9. generate single pulse with DAQ card

10. DAQ card pressure sensor connections - voltage offset

11. Analog outputs of DAQ-6062 card not working properly

12. DAQ cards from ComputerBoards

 

 
Powered by phpBB® Forum Software