Hong Kong Polytechnic University
Department of Electronic and Information Engineering
8255 PPI chip
Objectives : To study how 8255 PPI chip works.
After completing this experiment, you should know the different operation modes of
an 8255 PPI chip and how to configure the chip to operate in a particular operation
mode. You should also know how to use handshake to transfer data in an interface.
Software : Text editor, 8051 cross-assembler, 8051 linker and 8051 programmer
Apparatus : 8051 evaluation board and 8255 evaluation board
H-P. Messmer, "The indispensable PC hardware book," 3rd Ed, Addison-Wesley,
1997 Chapter 29 Section 2.
Barry B. Bery, “The Intel Microprocessors: 8086/8088, 80186/80188, 80286, 80386,
80486, Pentium, Pentium Pro Processor, Pentium II, Pentium III, Pentium 4 -
Architecture, Programming, and Interfacing”, 6th Ed, Chapter 11, Section 3.
AT89S8252 datasheet (instruction set)
The 8255 PPI chip is a general purpose programmable I/O device which is designed for use with all
Intel and most other microprocessors. The 8255 has 24 I/O pins divided into 3 groups of 8 pins each.
The groups are denoted by port A, port B and port C respectively. Every one of the ports can be
configured as either an input port or an output port.
The 8255 can be programmable in three different modes:
• Mode 0: simple unidirectional input/output without handshake
• Mode 1: unidirectional input/output with handshake via some pins of port C
• Mode 2: bidirectional input/output with handshake via some pins of port C
Handshake is a common technique used to transfer data in an interface. A computer and a device
usually operate at different system clock rates and hence the data transfer between their
corresponding I/O interface may not be so reliable. For example, the device might not be fast enough
CSF-LAB/PPI 8255/CC/EIE PolyU/p.1