Q4Microprocessor and Interfaces
Question
10 marks
(a) Explain the interfacing of 8255 with 8086. (b) Discuss the concept of keyboard interfacing and display interfacing.
Answer
Interfacing 8255 with 8086
The 8086 has a 16-bit data bus, so memory and I/O are divided into Even (D0-D7) and Odd (D8-D15) banks. To interface an 8-bit peripheral like the 8255, it can be mapped to either the even or odd address space.
- Even Address Interfacing: Data lines D0-D7 of 8255 connect to D0-D7 of 8086. Address lines A1 and A2 of 8086 connect to A0 and A1 of 8255. A0 of 8086 is used in the chip select decoding to ensure it only activates on even addresses.
- Odd Address Interfacing: Data lines D0-D7 of 8255 connect to D8-D15 of 8086. BHE' signal is used in chip select logic to activate on odd addresses.
- Keyboard Interfacing: Keyboards are arranged in a matrix of rows and columns. The microprocessor interfaces via an I/O port (like 8255 or specialized 8279). It sequentially drives rows low and reads columns to identify the pressed key. Software or hardware debouncing is used to handle mechanical switch bounce.
- Display Interfacing: 7-segment LEDs are commonly used. To save hardware and power, multiplexing is employed. The segments of all digits are connected in parallel to one port, while the common anodes/cathodes are driven sequentially by another port at a fast rate, relying on the persistence of human vision.