beautypg.com

Omega Engineering DIGITAL INPUT/OUTPUT PCI-DIO96 User Manual

Page 15

background image

GROUP 0, PORT B DATA
BADR3 + 1
READ/WRITE

D0

D1

D2

D3

D4

D5

D6

D7

0

1

2

3

4

5

6

7

GROUP 0, PORT C DATA
BADR3 + 2
READ/WRITE

CL1

CL2

CL3

CL4

CH1

CH2

CH3

CH4

C1

C2

C3

C4

C5

C6

C7

C8

0

1

2

3

4

5

6

7

GROUP 0 CONFIGURE
BADR3 + 3
READ/WRITE

CL

B

M1

CH

A

M2

M3

MS

0

1

2

3

4

5

6

7

This register is used to configure the Group 0 ports as either input or output, and
configures the operating mode to mode 0, 1 or 2. The following describes
configuration for mode 0. See the Intel or Harris 8255 data sheets for information on
other modes of operation

8255 MODE 0 CONFIGURATION

1. Output Ports
In mode 0 configuration, 82C55 ports can be configured as outputs, holding the data
written to them. For example, to set all three ports (A, B, & C) of Group 0 to output
mode, write the value 80 hex to BADR3 + 3 (refer to Table 5-3 below). The user is
then able to read the current state of the output port by simply reading the address
corresponding to that port.

2. Input Ports
In mode 0 configuration, the 82C55 ports can be configured as inputs, reading the
state of the inputs lines. For example, to set all of the ports of Group 0 to the input
mode, write the value 9B hex to BADR3 + 3.

12