beautypg.com

Measurement Computing CIO-DAS16/M1 User Manual

Page 26

background image

22

OUTPUT PORTS

In 82C55 mode 0 configuration, ports configured for output hold the output data written to them. This
output byte can be read back by reading a port configured for output.

INPUT PORTS

In 82C55 mode 0 configuration, ports configured for input read the state of the input lines at the moment
the read is executed. Transitions are not latched.

For information on modes 1 (strobed I/O) and 2 (bi-directional strobed I/O), please refer to an Intel or
AMD data book and see the 82C55 data sheet.

82C55 CONTROL REGISTER
BASE ADDRESS + 403

7

6

5

4

3

2

1

0

Group A

Group B

MS

M3

M2

A

CU

M1

B

CL

The 82C55 can be programmed to operate in Input/ Output (mode 0), Strobed Input/ Output (mode 1) or
Bi-Directional Bus (mode 2).

Information on programming the 82C55 in mode 0 is included. Those wishing to use the 82C55 in modes
1 or 2, or who wish to program the 82C54 counter must procure a data sheet from the Intel or Harris web
site.

When the PC is powered up or RESET, the 82C55 is reset. This places all 24 lines in input mode; no
further programming is needed to use the 24 lines as TTL inputs.

To program the 82C55 for other modes, the following control code bits must be assembled into an 8-bit
byte.

MS = Mode Set. 1 = mode set active

M3 M2

Group A Function

0 0

Mode 0 Input / Output

0 1

Mode 1 Strobed Input / Output

1 X

Mode 2 Bi-Directional Bus

A B CL CH Independent Function
1 1 1 1 Input
0 0 0 0 Output

M1 = 0 is mode 0 for group B. Input / Output
M1 = 1 is mode 1 for group B. Strobed Input / Output

Ports A, B, C-High, and C-Low can be independently programmed for input or output.

Group A and group B can be independently programmed in one of several modes. The most commonly
used is mode 0, input/output mode. The codes for programming the 82C55 in this mode are in Table 4-5
below.