Appendix B
Register-Level Programming — Programming
©
National Instruments Corporation
B-17
PCI-DIO-96/PXI-6508/PCI-6503 User Manual
Programming Considerations for the 82C55A
Modes of Operation
The following list contains the three basic modes of operation for the 82C55A. Ports A and
B can operate in different modes.
•
Mode 0—Basic I/O—This mode is used for simple input and output operations for each
port. No handshaking is required; a specified port simply writes to or reads from data.
Mode 0 has the following features:
–
Two 8-bit ports (A and B) and two 4-bit ports (upper and lower nibbles 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 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) and includes
the following features:
–
Each group contains one 8-bit data port (port A or port B) and one 3-bit control/data
port (upper or lower portion of port C).
–
The 8-bit data ports can be either input or output; both are latched.
–
The 3-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 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 portion 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.
The 82C55A also has a single bit set/reset feature for port C, which is programmed by the
8-bit control word. 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.