Contents

 

The 8255 PC Interface Card

 

The 8255 PPI IBM PC Interface Card (Programmable Peripheral Interface) plugs into any available 8 or 16-bit slot (AT-slot) on PCs motherboard. Such a card allows you to do both digital input and output to your PC. The 8255A card is programmable by the sysstem software. It has a 3-state bi-directional 8-bit buffer which interfaces the 8255A to the system data bus. Peripheral devices like printers, keyboards, controllers, DAC, ADC can work with the 8255A IC.

 

PC ISA BUS card is PC card (Jameco P/N 21531) that plugs into the expansion slot on PC motherboard there are 31 pads on each side of the card. Such cards are 8-bit ISA Bus cards. The Figure of ISA Bus cards shows the pinouts of such expansion slots.

Peripheral device in a microcomputer system usually has a "service routine" associated with it. This routine manages the software interface between the device and the CPU. By examining the I/O devices interface characteristics for data transfer and timing, and matching this information to the examples and tables in the operational description, a control word can be developed to initialize the 8255A/82C55A to exactly "fit" the application.

Data is transmitted or received by the device buffer upon execution of input or output instructions by the CPU. Control words and device status information are also transferred through the data bus buffer.

 

The 8255A IC device has 24 I/O pins which may be individually programmed in 2 groups of 12 and used in 3 basic modes of operation. The modes can be selected by the system software.

 

8255 Control Mode Configuration.

The 8255 allows for three distinct operating modes (Modes 0, 1 and 2) as follows:

MODE 0 - Basic Input/Output: Each group of 12 I/O pins may be programmed in sets of 4 to be input or output.

MODE 1 - Strobed Input/Output: Each group of 12 I/O pins may be programmed to have 8 lines of input or output. Of the remaining 4 pins, 3 are used for handshaking and interrupt control signals.

MODE 2 - Bi-Directional Bus: 8 lines are used for a bi- directional bus, and 5 lines (borrowing one from the other group of 12) are used for handshaking.

 

The RD#, WR#, A0 and A1 (Port Select 0 and Port Select 1) signals are input into the device. The Read/Write Control Logic issues control words to the device Group A and Group B Controls. The Group A and Group B Controls, in turn, issue commands to the associated ports. The Control Groups are defined as:

Control Group A: Port A and Port C upper (C7-C4).

Control Group B: Port B and Port C lower (C3-C0).

 

The device contains three 8-bit ports (A, B, and C). These 3 ports receive control words from the Group A and Group B Controls. These 3 ports have special features:

PORT A: One 8-bit data output latch/buffer and one 8-bit data input latch.

PORT B: One 8-bit data input/output latch buffer and one 8-bit data input buffer.

PORT C: One 8-bit data output latch/buffer and one 8-bit data input buffer (no latch for the input). This port can be divided into two 4-bit ports under the mode control. Each 4-bit port contains a 4-bit latch and it can be used for the control signal outputs and status signal inputs in conjunction with ports A and B.

 

Port A is always at Base Address, Port B is Base Address plus 1, Port C is Base Address plus 2. In our case Ports A, B and C are at 608, 609 and 610 (Decimal) respectively.

 

The 8255 has three 8-bit TTL-compatible I/O ports. Thus technically you could control up to 24 individual devices (for example: a home security device, with a digital input detecting if someone rang your doorbell, and having a digital output turning on a light switch, the other remaining DIOs could then be used to detect for sound detection, doors being opened, digitally dial 911, detect smoke etc..).

 

 

The Table 3 shows the special values needed to configure Ports A, B and C for either input or output.

 

 

Table 3 8255 Control Mode Configuration

 

Control Word (Hex)

Control Word (Decimal)

Port A

Port B

Port C

80

128

OUT

OUT

OUT

82

130

OUT

IN

OUT

85

137

OUT

OUT

IN

87

139

OUT

IN

IN

88

144

IN

OUT

OUT

8A

146

IN

IN

OUT

8C

153

IN

OUT

IN

8F

155

IN

IN

IN