8255 Programmable Peripheral Interface Block Diagram Function of
8255: Programmable Peripheral Interface Block Diagram
Function of pins: • Data bus(D 0 -D 7): These are 8 -bit bi-directional buses, connected to 8085 data bus for transferring data. • CS: This is Active Low signal. When it is low, then data is transfer from 8085. • Read: This is Active Low signal, when it is Low read operation will be start. • Write: This is Active Low signal, when it is Low Write operation will be start.
• Address (A 0 -A 1): These two lines are used to select the ports as follows: A 1 A 0 Select 0 0 Port A 0 1 Port B 1 0 Port C 1 1 Control reg.
• • RESET: This is used to reset the device. That means clear control registers. PA 0 -PA 7: It is the 8 -bit bi-directional I/O pins used to send the data to peripheral or or to receive the data from peripheral. PB 0 -PB 7: Similar to PA PC 0 -PC 7: This is also 8 -bit bidirectional I/O pins. These lines are divided into two groups. 1. PC 0 to PC 3(Lower Groups) 2. PC 4 to PC 7 (Higher groups) These two groups working in separately using 4 data’s.
Data Bus buffer: • It is a 8 -bit bidirectional Data bus. • Used to interface between 8255 data bus with system bus. • The internal data bus and Outer pins D 0 -D 7 pins are connected in internally. • The direction of data buffer is decided by Read/Control Logic.
Read/Write Control Logic: • This is getting the input signals from control bus and Address bus • Control signal are RD and WR. • Address signals are A 0, A 1, and CS. • 8255 operation is enabled or disabled by CS.
Group A and Group B control: • Group A and B get the Control Signal from CPU and send the command to the individual control blocks. • Group A send the control signal to port A and Port C (Upper) PC 7 -PC 4. • Group B send the control signal to port B and Port C (Lower) PC 3 -PC 0.
Control Word format D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 Group A Mode set flag=1=Active Port C Upper 1=Input 0=Output Port A 1=Input 0=Output Mode selection 00=mode 0 01=mode 1 1 x=mode 2 Group B Port C Lower 1=Input 0=Output Port B 1=Input 0=Output Mode selection 0=mode 0 1=mode 1
8255: Mode 0, Simple I/O • In this mode , port A, port B and port C is used as individually (Simply). • Features: • Outputs are latched , Inputs are buffered not latched. • Ports do not have Handshake or interrupt capability.
8255: Mode 1, Asynchronous & Interrupt Driven • In this mode, input or output is transferred by hand shaking Signals. • Handshaking signals is used to transfer data between those devices whose data transfer rate is not same. • In mode 1, Port A and Port B use the lines on Port C to generate or accept these “handshaking” signals
Mode 1 Operation (Input Control signal)
Mode 1 Output Control Signal
Mode 2 Bi-directional Operation • This functional configuration provides a means for communicating with a peripheral device or structure on a single 8 -bit bus for both transmitting and receiving data (bidirectional bus I/O). • “Handshaking” signals are provided to maintain proper bus flow discipline in a similar manner to MODE 1. • Interrupt generation and enable/disable functions are also available
Mode 2 Bi-directional Operation
BIT Set Reset Mode (BSR Mode) • The PORT C can be Set or Reset by sending OUT instruction to the CONTROL registers. • The control word format for the BSR mode is shown.
FOR BIT SET/RESET MODE: • This is bit set/reset control word format. D 7 D 6 D 5 D 4 X X X Don’t care D 3 D 2 D 1 D 0 BIT SET/RESET 1=SET 0=RESET Bit select 0 1 2 3 4 5 6 7 0 1 0 1 B 00 1 0 0 1 1 0 0 B 11 1 0 0 1 1 B 12 1 BIT SET/RESET FLAG =0 Active
- Slides: 16