beautypg.com

Measurement Computing PC104-DIO48 User Manual

Page 13

background image

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 here.
Those wishing to use the 82C55 in modes 1 or 2, must procure a data
sheet from Intel Corporation Literature Department. Visit their web site
to obtain this data sheet.

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

To program the 82C55 for other modes, the following control code byte
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

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

The two groups of ports, group A and group B, may be independently
programmed in one of several modes. The most commonly used mode is
mode 0, input/output mode. The codes for programming the 82C55 in
mode 0 are listed in Table 2-3.

9