Independent handshaking on Ports A and B of an 8255-based device.
Can You Perform Handshaking Independently on Ports A and B of a DAQ Board with the 8255 Digital Chip?
Suppose you have a PCI-DIO-24 and would like to perform handshaking on Port A and Port B independently. You know that you can use Port B's handshaking lines to perform 16-bit handshaking on Ports A and B together, but the user manual does not mention whether you can use the handshaking lines for Port A and B at the same time, independently.
This is possible if you configure Port A as group 0 and Port B as group 1 (i.e. as two separate groups). When the PCI-DIO-24 is configured for handshaking, Port A is digital channel 0, Port B is digital channel 1, and Port C is reserved for handshaking. Suppose you want to perform buffered handshaked input on Port A and buffered handshaked output on Port B. First, you must configure the digital channel 0 as group 0 and digital channel 1 as group 1. Next specify the direction of the groups. Then connect the handshaking lines. For input on Port A, connect your input timing signal to the handshaking line called STBa (PC4 or pin 7). For output on Port B, connect your output timing signal to the handshaking line called ACKb (PC2 or pin 11). The example attached illustrates how to program such an application in LabVIEW.
One other important thing to note is that 8255 devices cannot perform pattern I/O; however, at slow enough speeds you can supply external timing signals to the handshaking line inputs for various ports (e.g. STBa or ACKb) and ignore the handshaking line outputs to achieve pseudo-pattern I/O. For example, connecting a pulse train from a counter to the handshaking line inputs of a PCI-DIO-24 allows you to clock data in/out at regular intervals much like pattern I/O on a PCI-6533. The pitfall is that the device is still performing handshaking and thus may not clock data in/out on every pulse. To check for this condition, you can monitor the handshaking line outputs (e.g. IBFa or OBFb), which tell you when the input or output buffers are full, indicating that the device is unable to keep up with the external timing signal.
Back to Top