You are on page 1of 2

The Intel 8255 (or i8255) Programmable Peripheral Interface chip is a peripheral chip originally developed for the

Intel 8085 microprocessor. The 8255 Programmable Peripheral Interface (PPI) is a versatile and easy to construct circuit card the plugs into an available slot in your IBM PC. The 8255 Programmable Peripheral Interface (PPI) is a very popular and versatile input / output chip that is easily configured to function in several . The use of 8255 PPI to increase the i/o lines of microcontroller 8051 is a good option. Here we discuss it in some detail, the hardware and software requirements of the interface of 8255 PPI. how a PC printer port may be interfaced with an 8255 Programmable Peripheral Interface to provide 24 outputs.

Pin Configuration
D0 - D7 These are the data input/output lines for the device. All information read from and written to the 8255 occurs via these 8 data lines. CS (Chip Select Input). If this line is a logical 0, the microprocessor can read and write to the8255. RD (Read Input) Whenever this input line is a logical 0 and the RD input is a logical 0, the 8255 data outputs are enabled onto the system data bus. WR (Write Input) Whenever this input line is a logical 0 and the CS input is a logical 0, data is written to the 8255 from the system data bus A0 - A1 (Address Inputs) The logical combination of these two input lines determines which internal register of the 8255 data is written to or read from. RESET. The 8255 is placed into its reset state if this input line is a logical 1. All peripheral ports are set to the input mode. PA0 - PA7, PB0 - PB7, PC0 - PC7 These signal lines are used as 8-bit I/O ports. They can be connected to peripheral devices. The 8255 has three 8 bit I/O ports and each one can be connected to the physical lines of an external device. These lines are labeled PA0-PA7, PB0-PB7, and PC0-PC7. The groups of the signals are divided into three different I/O ports labeled port A (PA), port B (PB), and port C (PC).

Control Modes
The 8255 allows for three distinct operating modes (Modes 0, 1 and 2) as follows. Mode 0 Ports A and B operate as either inputs or outputs and Port C is divided into two 4-bit groups either of which can be operated as inputs or outputs Mode 1 Same as Mode 0 but Port C is used for handshaking and control Mode 2 Port A is bidirectional (both input and output) and Port C is used for handshaking. Port B is not used.

RS232
8051 microcontroller represents 1 by +5 volts and 0 by 0 volts while a computer represents 1 by and a zero by. To make the output of a microcontroller compatible with the pc RS232 is used. Now that we have the 8 bit value in the 8051, we want to send that value to the PC. The 8051 has a built in serial port that makes it very easy to communicate with the PC's serial port but the 8051 outputs are 0 and 5 volts and we need +10 and -10 volts to meet the RS232 serial port standard. The easiest way to get these values is to use the MAX232. The MAX232 acts as a buffer driver for the processor. It accepts the

standard digital logic values of 0 and 5 volts and converts them to the RS232 standard of +10 and -10 volts. It also helps protect the processor from possible damage from static that may come from people handling the serial port connectors. The MAX232 requires 5 external 1uF capacitors. These are used by the internal charge pump to create +10 volts and -10 volts. For the first capacitor, the negative leg goes to ground and the positive leg goes to pin 16. For the second capacitor, the negative leg goes to 5 volts and the positive leg goes to pin 2. For the third capacitor, the negative leg goes to pin 3 and the positive leg goes to pin 1. For the fourth capacitor, the negative leg goes to pin 5 and the positive leg goes to pin 4. For the fifth capacitor, the negative leg goes to pin 6 and the positive leg goes to ground. The MAX232 includes 2 receivers and 2 transmitters so two serial ports can be used with a single chip. We will only use one transmitter for this project. The only connection that must be made to the 8051 is one jumper from pin 3 of the 8051 to pin 11 of the MAX232. To power the MAX232, Connect pin 16 to 5 volts and 15 to ground. The only thing left is that we need some sort of connector to connect to the serial port. The sample code below is written for Comm1 and most computers use a 9 pin DB9 male connector for Comm1 so a 9 pin female connector is included for this project. You may also want to buy a DB9 extension cable (Shown on order form as DB9 to DB9 cable) to make the connection easier. There should be 3 wires soldered to the DB9 connector pins 2, 3 and 5. Connect the wire from pin 5 of the connector to ground on the breadboard. Connect the wire from pin 2 of the connector to pin 14 of the MAX232. (The other wire is for receiving and is not used in this project.)

You might also like