Chapter 4
Digital I/O
4-2
ni.com
or output. At system startup and reset, the DIO ports are all
high-impedance.
The hardware up/down control for general-purpose Counters 0 and 1 are
connected onboard to P0.6 and P0.7, respectively. Thus, you can use P0.6
and P0.7 to control the general-purpose counters. The up/down control
signals, Counter 0 Up/Down and Counter 1 Up/Down, are input-only and
do not affect the operation of the DIO lines. Refer to Chapter 5,
for more information on counters.
(NI 6016 and NI 6025E Devices Only)
The NI 6016 and NI 6025E use an
82C55A programmable peripheral interface to provide additional lines of
digital I/O that represent three 8-bit ports. Refer to the
section for more information.
Extended Digital I/O
(NI 6016 and NI 6025E Devices Only)
The NI 6016 and NI 6025E use an
82C55A programmable peripheral interface (PPI) to provide an additional
24 lines of DIO that represent three 8-bit ports: P1, P2, and P3. The
82C55A has three modes of operation: simple I/O (mode 0), strobed I/O
(mode 1), and bidirectional I/O (mode 2). In modes 1 and 2, the three ports
are divided into two groups: group A and group B. Each group has eight
data bits, plus control and status bits from Port 3 (P3). Modes 1 and 2 use
handshaking signals from the computer to synchronize data transfers.
NI-DAQmx does not currently support mode 2.
The Example Finder contains examples for programming the 82C55A in
both Traditional NI-DAQ (Legacy) and NI-DAQmx. To locate the
examples, use the keywords
8255
or
handshaking
.
Port 3 Signal Assignments
(NI 6016 and NI 6025E Devices Only)
The signals assigned to port 3 depend on
how the 82C55A is configured. In mode 0, or no handshaking
configuration, port 3 is configured as two 4-bit I/O ports. In modes 1 and 2,
or handshaking configuration, port 3 is used for status and handshaking
signals with any leftover lines available for general-purpose I/O. Table 4-1
summarizes the port 3 signal assignments for each configuration. You can
also use ports 1 and 2 in different modes; Table 4-1 does not show every
possible combination.
Note
Table 4-1 shows both the port 3 signal assignments and the terminology correlation
between different documentation sources. The 82C55A terminology refers to the different