Appendix E
Register-Level Programming
© National Instruments Corporation
E-25
Lab-PC+ User Manual
Modes of Operation for the 8255A
The three basic modes of operation for the 8255A are as follows:
•
Mode 0 – Basic I/O
•
Mode 1 – Strobed I/O
•
Mode 2 – Bidirectional bus
The 8255A also has a single bit set/reset feature for Port C. The 8-bit control word also
programs this function. For additional information, refer to Appendix C, OKI 82C55A Data
Sheet.
Mode 0
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.
Control Words
Mode 0 provides simple I/O functions for each of the three ports with no handshaking. Each port
can be assigned as an input port or as an output port. The 16 possible I/O configurations are
shown in Table E-5. Notice that bit 7 of the control word is set when programming the mode of
operation for each port.
Summary of Contents for Lab-PC+
Page 89: ......
Page 90: ......
Page 91: ......
Page 92: ......
Page 93: ......
Page 94: ......
Page 95: ......
Page 96: ......
Page 97: ......
Page 98: ......
Page 99: ......
Page 101: ......
Page 102: ......
Page 103: ......
Page 104: ......
Page 105: ......
Page 106: ......
Page 107: ......
Page 108: ......
Page 109: ......
Page 110: ......
Page 111: ......
Page 112: ......
Page 113: ......
Page 114: ......
Page 115: ......
Page 116: ......