Mode 0, Mode 1, Mode 2 – National Instruments PC-DIO-24 User Manual
Page 32: Single bit set/reset feature
Register-Level Programming
Chapter 4
PC-DIO-24 User Manual
4-2
© National Instruments Corporation
Mode 0
This mode can be used for simple input and output operations for each of the ports. No
handshaking is required; data is simply written to or read from a selected port.
Mode 0 has the following features:
•
Two 8-bit ports (A and B) and two 4-bit ports (upper and lower nibble of port C).
•
Any port can be input or output.
•
Outputs are latched, but inputs are not latched.
Mode 1
This mode transfers data that is synchronized by handshaking signals. ports A and B use the
eight lines of port C to generate or receive the handshake signals. This mode divides the ports
into two groups (group A and group B):
•
Each group contains one 8-bit data port (port A or port B) and one 4-bit control/data port
(upper or lower nibble of port C).
•
The 8-bit data ports can be either input or output, both of which are latched.
•
The 4-bit ports are used for control and status of the 8-bit data ports.
•
Interrupt generation and enable and/or disable functions are available.
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. Interrupt generation and enable and/or disable functions
are also available. Other features of this mode include the following:
•
Used in group A only (port A and upper nibble of port C).
•
One 8-bit bidirectional port (port A) and a 5-bit control status port (port C).
•
Latched inputs and outputs.
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
status and control for port A and port B when operating in mode 1 or mode 2.