User manual

Appendix D Register-Level Programming
PC-DIO-96/PnP User Manual D-12
©
National Instruments Corporation
Mode 2
This mode can be used for communication over a bidirectional 8-bit
bus. Handshaking signals are used in a manner similar to mode 1.
Mode 2 is available for use in group A only (port A and the upper nibble
of port C). Other features of this mode include the following:
One 8-bit bidirectional port (port A) and a 5-bit control/status port
(port C).
Latched inputs and outputs.
Interrupt generation and enable/disable functions.
Single Bit Set/Reset Feature
Any of the eight bits of port C can be set or reset with one control word.
This feature generates control signals for port A and port B when these
ports are operating in mode 1 or mode 2.
Mode 0—Basic I/O
Mode 0 can be used for simple I/O functions (no handshaking) for each
of the three ports. Each port can be assigned as an input or an output
port. The 16 possible I/O configurations are shown in Table D-3. Notice
that bit 7 of the control word is set when programming the mode of
operation for each port.
Table D-3. Mode 0 I/O Configurations
Control Word Group A Group B
Number Bit
76543210
Port A Port C
1
Port B Port C
2
0 10000000 Output Output Output Output
1 10000001 Output Output Output Input
2 10000010 Output Output Input Output
3 10000011 Output Output Input Input
4 10001000 Output Input Output Output
5 10001001 Output Input Output Input
6 10001010 Output Input Input Output
7 10001011 Output Input Input Input
8 10010000 Input Output Output Output