Our Latest News

8255 Microcontroller Introduction

8255 Microcontroller Information and Introduction

The 8255 internally includes three parallel data input/output ports, two operating mode control circuits, a read/write control logic circuit, and an 8-bit bus buffer. The functions of each part are summarized as follows.

This image has an empty alt attribute; its file name is image-415.png

(1) Ports A, B, C
Port A: is an 8-bit data output latch/buffer and an 8-bit data input latch.
Port B: is an 8-bit data input/output latch/buffer and an 8-bit data input latch.
Port C: is an 8-bit data output latch/buffer and an 8-bit data input buffer (input is not latched).
Usually port A and port B are used as data input/output ports, and port C is used as control/status information port, which can be divided into two 4-bit ports under the control of “mode control word”, and each port has a 4-bit latch to be used with port A and port B as control signal output or status information input port respectively.

(2) Working mode control circuit
There are two operating mode control circuits, one is the Group A control circuit and the other is the Group B control circuit. These two control circuits have a control command register, which is used to accept the control word from the central processor to decide the working mode of the two ports, and can also clear “0” by bit or “1” by position for the C port according to the requirements of the control word.
The control circuit of group A is used to control the upper part of port A and C (PC7-PC4), and the control circuit of group B is used to control the lower part of port B and C (PC3-PC0).

(3) Bus data buffer
The bus data buffer is a three-state bidirectional 8-bit buffer that serves as an interface between the 8255 and the system bus to transmit data, commands, control commands, and external status information.

(4) Read/Write Control Logic Circuit
The read/write control logic circuit accepts the control signals RD, WR, RESET, address signals A1-A0, etc. from the CPU, and then reads the port data and sends it to the CPU or writes the data sent by the CPU to the port according to the requirements of the control signals.

Operating mode control word

D0 Port C (lower half) 1:Input 0:Output Group B
D1 Port B 1:input 0:output
D2 Mode selection 0:Mode 0 1:Mode 1
D3 Port C (upper half) 1:Input 0:Output Group A
D4 Port A 1:input 0:output
D5D6 Mode selection 00:Mode 0 10:Mode 1 *1:Mode 2
D7 Set mode flag 1:valid  
Port C bit-by-bit operation control word:

D0 Bit:Set/Reset 1:Set 0:Reset
D3D2D1
000 001 010 011 100 101 110 111
CO C1 C2 C3 C4 C5 C6 C7
D4 None
D5
D6
D7 Bit:Set/reset flag 0:Valid
Operation mode 0:
Mode 0 is a basic input/output mode of operation in which all three ports can be programmed as inputs or outputs without a fixed contact signal for answering. Its basic functions can be summarized as follows:

1、It can have two 8-bit ports (A, B) and two 4-bit ports (the upper part and lower part of port C).
2、Any of the ports can be set as input or output, and the input and output of each port can constitute 16 combinations.
3、Data can be latched when outputting, and not latched when outputting.

When working in mode 0, the CPU can read/write to a port by a simple transmission instruction, so that each port can be used as a query input/output interface. When working according to the query mode, port A and port B can be used as two data input/output ports, and some bits of port C can be used as the control/status signal terminals of these two ports.

Operating mode 1
Operation mode 1 is a selective input/output operation mode. In this mode of operation, the selector signal is transmitted together with the input/output data, and the selector signal is used to select the data. Its basic functions can be summarized as follows.

1、The three ports are divided into two groups, namely group A and group B.
2, each group includes an 8-bit data port and a 4-bit control/status port.
3, Each 8-bit data port can be set as input or output, and the inputs can be latching.
4、The 4-bit port is used as the control/status signal port of the 8-bit data port.

Working mode 2.
In addition to operating mode 0 and 1, A port also has operating mode 2. When operating according to mode 2, A port is called bidirectional data bus port, which can both send data and receive data. Its main functions can be summarized as follows.

1, there is an 8 for bidirectional data input / output port (A) and a 5-bit control signal port (C).
2, input and output can be latching.
3, 5-bit control signal port (C) as 8-bit bidirectional data input / output port A control / status signal port.
4、Working mode 2 is only suitable for port A.

When working in accordance with mode 2, port A can work in both query mode and interrupt mode. The control contact signal as shown in the figure:

8255A pin function and pin definition diagram

8255 has a total of 40 pins, using a double inline package, each pin function is as follows:

D0 – D7: three-state bidirectional data lines, and the microcontroller data bus connection, used to transmit data information.
CS: chip select signal line, active low, indicating that the chip is selected.
RD: Read signal line, active low, control the data read out.
WR: Write signal line, active low, controls the writing of data.
Vcc: +5V power supply.
PA0–PA7: A port input/output line.
PB0–PB7: B port input/output line.
PC0–PC7: C port input/output line.
RESET: reset signal line.
A1, A0: Address line, used to select the 8255 internal port.
GND: Ground line.

8255 VHDL Code 8255A Programmable Parallel Interface

    GET A FREE QUOTE

    FPGA IC & FULL BOM LIST

    We'd love to

    hear from you

    Highlight multiple sections with this eye-catching call to action style.

      Contact Us

      Exhibition Bay South Squre, Fuhai Bao’an Shenzhen China

      • Sales@ebics.com
      • +86.755.27389663