Справочник Пользователя для National Instruments PC-DIO-24
© National Instruments Corporation
4-1
PC-DIO-24 User Manual
Chapter 4
Register-Level Programming
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.
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.
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.
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.
programs this function. For additional information, refer to Appendix C, OKI 82C55A Data
Sheet.