National Instruments 320174B-01 Computer Hardware User Manual


 
Register-Level Programming Chapter 4
Lab-NB User Manual 4-56 © National Instruments Corporation
Mode 0–Basic I/O
This mode is for simple I/O operations for each of the ports. No handshaking is required; data is
simply written to or read from a specified 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–Strobed I/O
This mode is used for transferring data with handshake 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/disable functions are available.
Mode 2–Bidirectional Bus
This mode is for communication over a bidirectional 8-bit bus. Handshake signals can be used
in a manner similar to mode 1. Interrupt generation and enable/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).
Both inputs and outputs are latched.
Single Bit Set/Reset Feature
Any of the 8 bits of port C can be set or reset with one control word. This feature is used to
generate status and control for port A and port B when operating in mode 1 or mode 2.