National Instruments PC-DIO-24/PnP Switch User Manual


 
Appendix C Register-Level Programming
PC-DIO-24/PnP User Manual C-8
©
National Instruments Corporation
Programming Considerations for the 82C55A
Modes of Operation for the 82C55A
The three basic modes of operation for the 82C55A are as follows:
Mode 0—Basic I/O
Mode 1—Strobed I/O
Mode 2—Bidirectional bus
The 82C55A also has a single bit set/reset feature for port C, which is
programmed by the 8-bit control word. For additional information, refer
to Appendix B,
OKI 82C55A Data Sheet
.
Mode 0
Use this mode for simple input and output operations for each of the
ports. No handshaking is required; simply write data to or read data
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
nibbles 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) and includes the following features:
Each group contains one 8-bit data port (port A or port B) and one
3-bit control/status port (upper or lower portion of port C).
The 8-bit data ports can be either input or output, both of which 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.