beautypg.com

Measurement Computing CIO-DAS08-AOH User Manual

Page 22

background image

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

NOTE

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 book from Intel Corporation Literature Department.

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 byte must be assembled into on 8-bit byte.

MS = Mode Set. 1 = mode set active

Output

0

0

0

0

Input

1

1

1

1

INDEPENDENT FUNCTION

CH

CL

B

A

Bi-Directional Bus

Mode 2

X

1

Strobed Input / Output

Mode 1

1

0

Input / Output

Mode 0

0

0

GROUP A FUNCTION

M2

M3

M1 = 0 is mode 0 for group B.

Input / Output

M1 = 1 is mode 1 for group B.

Strobed Input / Output

Port A, Port B, Port C-High, and Port C-Low can be independently programmed for inputs or outputs.

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 shown in the table
below.
D7 is always 1 and D6, D5 & D2 are always 0.

IN

IN

IN

IN

155

9B

1

1

1

1

OUT

IN

IN

IN

154

9A

0

1

1

1

IN

OUT

IN

IN

153

99

1

0

1

1

OUT

OUT

IN

IN

152

98

0

0

1

1

IN

IN

OUT

IN

147

93

1

1

0

1

OUT

IN

OUT

IN

146

92

0

1

0

1

IN

OUT

OUT

IN

145

91

1

0

0

1

OUT

OUT

OUT

IN

144

90

0

0

0

1

IN

IN

IN

OUT

139

8B

1

1

1

0

OUT

IN

IN

OUT

138

8A

0

1

1

0

IN

OUT

IN

OUT

137

89

1

0

1

0

OUT

OUT

IN

OUT

136

88

0

0

1

0

IN

IN

OUT

OUT

131

83

1

1

0

0

OUT

IN

OUT

OUT

130

82

0

1

0

0

IN

OUT

OUT

OUT

129

81

1

0

0

0

OUT

OUT

OUT

OUT

128

80

0

0

0

0

CL

B

CU

A

DEC

HEX

D0

D1

D3

D4

18

This manual is related to the following products: