Register Description For The 8253; Figure 4-2. Control-Word Format For The 8253; Table 4-2. Port C Set/Reset Control Words - National Instruments PC-DIO-96 User Manual

Digital i/o board for the ibm pc/xt/at
Table of Contents

Advertisement

Register-Level Programming
Warning:
During programming, note that each time a port is configured, output ports A
and C are reset to 0, and output port B is undefined.
Table 4-2 shows the control words for setting or resetting each bit in port C. Notice that bit 7 of
the control word is cleared when programming the set/reset option for the bits of port C.
Bit
Number
0
1
2
3
4
5
6
7

Register Description for the 8253

Figure 4-2 shows the control word format used to completely program the 8253. Bits 7 and 6 of
the control word select the counter to be programmed. Bits 5 and 4 select the mode by which the
count data is written to and read from the selected counter. Bits 3, 2, and 1 select the mode for
the selected counter. Bit 0 selects whether the counter counts in binary or BCD format.
Counter Select
00 = counter 0
01 = counter 1
10 = counter 2
11 = illegal
Access Mode
00 = latch counter value
01 = access LSB only
10 = access MSB only
11 = access LSB, then MSB
PC-DIO-96 User Manual

Table 4-2. Port C Set/Reset Control Words

Bit Set
Control Word
0xxx0001
0xxx0011
0xxx0101
0xxx0111
0xxx1001
0xxx1011
0xxx1101
0xxx1111
D7
D6
D5
D4

Figure 4-2. Control-Word Format for the 8253

Bit Reset
The Bit Set or
Control Word
Reset in Port C
0xxx0000
0xxx0010
0xxx0100
0xxx0110
0xxx1000
0xxx1010
0xxx1100
0xxx1110
D3
D2
D1
D0
4-4
© National Instruments Corporation
Chapter 4
xxxxxxxb
xxxxxxbx
xxxxxbxx
xxxxbxxx
xxxbxxxx
xxbxxxxx
xbxxxxxx
bxxxxxxx
BCD
1 = count in BCD
0 = count in binary
Mode Select
000 = mode 0
001 = mode 1
010 = mode 2
011 = mode 3
100 = mode 4
101 = mode 5
110 = mode 2
111 = mode 3

Advertisement

Table of Contents
loading

Table of Contents