© National Instruments Corporation
4-1
PC-DIO-24 User Manual
Chapter 4
Register-Level Programming
This chapter describes in detail the address and function of each of the PC-DIO-24 control and
status registers. This chapter also includes important information related to register-level
programming the PC-DIO-24.
The PC-DIO-24 is a parallel, digital I/O board designed around the OKI 82C55A integrated
circuit. The 82C55A is a general-purpose peripheral interface containing 24 programmable I/O
pins. These pins represent the three 8-bit I/O ports (A, B, and C) of the 82C55A. These ports
can be programmed as two groups of 12 signals or as three individual 8-bit ports. This chapter
includes register-level programming information for the PC-DIO-24, along with program examples
written in C.
Note: If you plan to use a programming software package such as LabWindows/CVI or
NI-DAQ with your PC-DIO-24 board, you need not read this chapter.
Introduction
The three 8-bit ports are divided into two groups—group A and group B (two groups of 12
signals). One 8-bit configuration (or control) word determines the mode of operation for each
group. The group A control bits configure port A<0..7> and the upper 4 bits (nibble) of
port C<4..7>. The group B control bits configure port B<0..7> and the lower nibble of
port C<0..3>. These configuration bits are defined later in this chapter.
82C55A Modes of Operation
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. The 8-bit control word also
programs this function. For additional information, refer to Appendix C, OKI 82C55A Data
Sheet.
Содержание PC-DIO-24
Страница 51: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 2 National Instruments Corporation...
Страница 52: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 3 PC DIO 24 User Manual...
Страница 53: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 4 National Instruments Corporation...
Страница 54: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 5 PC DIO 24 User Manual...
Страница 55: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 6 National Instruments Corporation...
Страница 56: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 7 PC DIO 24 User Manual...
Страница 57: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 8 National Instruments Corporation...
Страница 58: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 9 PC DIO 24 User Manual...
Страница 59: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 10 National Instruments Corporation...
Страница 60: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 11 PC DIO 24 User Manual...
Страница 61: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 12 National Instruments Corporation...
Страница 62: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 13 PC DIO 24 User Manual...
Страница 63: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 14 National Instruments Corporation...
Страница 64: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 15 PC DIO 24 User Manual...
Страница 65: ...Appendix C OKI 82C55A Data Sheet PC DIO 24 User Manual C 16 National Instruments Corporation...
Страница 66: ...Appendix C OKI 82C55A Data Sheet National Instruments Corporation C 17 PC DIO 24 User Manual...