Professional Documents
Culture Documents
1|Page
Memory Mapping:
Since the first instruction is fetched from FFFF0H after the microprocessor is reset, it make
that address to be present in EPROM and write the memory map as follows. Locations having
addresses from FFFFFH to FE000H are allocated to EPROM 1 and 2. Immediate address
map FDFFFH to FD000H is allocated to RAM 1 and 2. The line which is differentiating
to identify odd and even
EPROM from RAM is A13. Let us use it along with A0 and BHE
banks.
If A0 is 0 i.e. the address is even, then the RAM chip is selected indicating 8-bit
transfer at an even address.
is 0, i.e. the address is odd, then the RAM chip is selected indicating that the
If BHE
8-bit transfer is at an odd address.
Since there is continuous address map, decoder is used to decode the chip select signals. The
.
inputs for the decoder would be A13, A0 and BHE
As the table shows, when the decoder output O0 is enabled it selects both even and odd banks
can be used accordingly to select only even or only odd bank.
in RAM. Then A0 and BHE
Similarly, EPROM is selected by O4.
Matrix Keyboard Interfacing:
Fig. below shows a matrix keyboard with 16 keys connected to the 8086 microprocessor
using 8255. A matrix keyboard reduces the number of connections, thus the number of
interfacing lines. In this example the keyboard with 16 keys, is arranged in 4 x 4 (4 rows and
4 columns) matrix. This requires eight lines from the microprocessor to make all the
connections instead of 16 lines if the keys are connected individually. The interfacing of
matrix keyboard requires two ports: one input port and one output port.
Unit-3, P-5 [Microprocessor & Microcontrollers] [ELE-355]
2|Page
Rows are connected to the input Port (return lines) and columns are connected to the Output
Port (scan lines). When all keys are open row and column do not have any connection. When
any key is pressed, it shorts corresponding row and column. If the output line of this column
is low, it makes corresponding row line low; otherwise the status of row line is high. The key
is identified by data sent on the output port and input code received from the input port. The
following explains the steps required to identify pressed key.
3|Page
4|Page
202, 204 and 402 sizes. Here the following is the pin configuration of 162 module has
14-pins the display is organized as two lines, each of 20 characters.
The figure shows the interfacing of a 20 character 2 line LCD module with the 8086. The
and E are drive by
data lines are connected to the port A of 8255 and control lines RS, R/W
PC0, PC1 and PC3 of port C, respectively. The voltage at VEE pin is adjusted by a
potentiometer to adjust the contrast of the LCD.
5|Page