Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Independent handshaking on Ports A and B of an 8255-based device.

5 ratings | 2.40 out of 5
Print

Downloads

Filename: patternio_8255_.zip
Requirements: View


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.

Requirements


Filename: patternio_8255_.zip

Software Requirements


Application Software: LabVIEW Full Development System 5.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy) 6.8.0

 
5 ratings | 2.40 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).