written 7.7 years ago by | • modified 7.7 years ago |
Mumbai university > Electronics engineering > Sem 4 > MPP
Marks : 10
Year : may 2014
written 7.7 years ago by | • modified 7.7 years ago |
Mumbai university > Electronics engineering > Sem 4 > MPP
Marks : 10
Year : may 2014
written 7.7 years ago by | • modified 5.7 years ago |
The 8255 is a general purpose programmable I/O device designed to transfer the data from I/O to interrupt I/O under certain conditions as required. It can be used with almost any microprocessor.
It consists of three 8-bit bidirectional I/O ports (24 I/O lines) which can be configured as per the requirement.
Features of IC 8255:-
a) Mode 0-simple I/O
b) Mode 1-strobed I/O
c) Mode 2-strobed bi-directional I/O
The block diagram of 8255 is as shown in fig.
It contains following blocks:
Data bus buffer
Read/write control logic
Group A and group B control
Port A and port B
Port C
Data bus buffer:-
It is a tri-state 8-bit buffer, which is used to interface the microprocessor to the system data bus. Data is transmitted or received by the buffer as per the instructions by the CPU. Control words and status information is also transferred using this bus. The direction of data buffer is decided by read and write control signals. When read is activated, it transmits data to the system data bus. When write is activated, it receives data from system data bus.
Read/write control logic:-
This block is responsible for controlling the internal/external transfer of data/control/status word. It accepts the input from the CPU address and control buses, and in turn issues command to both the control groups.
(CS) Chip Select. A "low" on this input pin enables the communcation between the 8255 and the CPU.
(RD) Read. A "low" on this input pin enables 8255 to send the data or status information to the CPU on the data bus. In essence, it allows the CPU to "read from" the 8255.
(WR) Write. A "low" on this input pin enables the CPU to write data or control words into the 8255.
Group A and group B control:-
The bit pattern is given by CPU consists of information
a)To control the operation of group A and group B
b) The mode in which they should be operated.
Port A and port B:-
Port A One 8-bit data output latch/buffer and one 8-bit data input latch. Both "pull-up" and "pull-down" bus-hold devices are present on Port A.
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 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 output and status signal inputs in conjunction with ports A and B.
8255 operating modes:-
BSR (Bit set reset) mode
I/O mode
BSR mode:-
There are three I/O modes of operation:
• Mode 0- Basic I/O
• Mode 1- Strobed I/O
• Mode 2- Bi-directional I/O
The I/O modes are programmed using control register.
The control word format of I/O modes is as shown in the figure below:
Function of each bit is as follows:
All the 3 modes i.e. Mode 0, Mode 1 and Mode 2 are only for group A ports, but for group B only 2 modes i.e. Mode 0 and Mode 1 are provided. When 8255 is reset, it will clear control word register contents and all the ports are set to input mode. The ports of 8255 can be programmed for other modes by sending appropriate bit pattern to control register.