Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Lesson 5:

Addressing modes and Addressing of microprocessor


system

5.1 Addressing Modes


Each instruction requires certain data on which it has to operate. The various techniques to
specify data for instruction are called Addressing Modes.

The 8085 has following addressing modes:


1. Direct Addressing
2. Register Addressing
3. Register indirect Addressing
4. Immediate Addressing
5. Implicit Addressing

We are going to focus on the Direct Addressing Mode and Register Addressing mode.

1. Direct Addressing Mode:


In this mode of addressing the address of the operand (data) is given in the instruction itself.

Examples are:
[1] STA 2400H Store the content of the accumulator in the memory location 2400H.
32,00,24 The above instruction in code form.
In this instruction 2400H is the memory location where data is to be stored. It is given in the
instruction itself. The 2nd and 3rd byte of the instruction specify the address of the memory
location. Here, it is understood that the source of the data is accumulator.

[2] IN 02H Read data from port C.


DB,02 Instruction in code form.
In this instruction 02H is the address of Port C of an I/O port from where the data is to be read.
Here, it is implied that the destination is the accumulator. The 2nd byte of the instruction specifies
the address of the port.

2. Register Addressing Mode:


In register addressing mode the operand is in one of the general purpose registers. The opcode
specifies the address of the register(s) in addition to the operation to be performed.

Examples are:
[1] MOV A, B Move the content of register B to register A.
78 The above instruction in code form.
The opcode for MOV A, B is 78H. Besides the operation to be performed the opcode also
specifies source and destination registers. The opcode 78H can be written in binary form as
01111000. The first two bits, i.e 01 are for MOV operation, the next three bits 111 are the
binary code for register A, and the last three bits 000 are the binary code for register B.

[2] IN 02H Read data from port C.


DB,02 Instruction in code form.
In this instruction 02H is the address of Port C of an I/O port from where the data is to be read.
Here, it is implied that the destination is the accumulator. The 2nd byte of the instruction specifies
the address of the port.

3 Homework: Make a research on Register indirect Addressing,Immediate Addressing and


Implicit Addressing modes.

By Jean de Dieu NGUIMFACK NDONGMO, PhD -EAA 1


5.2 Addressing of microprocessor system
Case STUDY 1: A simulator of a calculator
Fig.5 1 is a simulator of a calculator using microprocessor 8051.
a) What is the difference between a microprocessor and a microcontroller?
b) Indicate the length n of data word and the length m of address word for 8051.
c) Calculate the addressing capacity of 8051 in Kb (Kilobytes)
d) Give the function of the following pins : XTAL1 et XTAL2, ALE ; RST
e) Identify the Input/Output ports of the 8051 by filling Table 4.1
f) What is the role of circuit 74LS373?
g) Find the address bit and the corresponding logical level for circuit U2 to be active
h) Give the Nature of U2 and his capacity in Kb
i) What is the number of address bits for the LCD ? Deduce his number of registers
j) Identify the pin (Name and number) of the LCD used for the validation
k) Write the logic equation used for the validation of LCD
l) Assuming that the validation pin of the LCD1 is active at the lowest level. Fill table
4.2 when this assumption is true.
1.13-Donner les plages des adresses de U2 et LCD1 en complétant le tableau 3.

Table 4 .1
I/O Parallel port I/O Series Port
Pin’s number
Pin’s name

Table 4. 2
Validation of the LCD1
Pin’s number
Pin’s name
Logic level

Table 4. 3 : Addressing ranges


Circuit Adresse en Binaire Hexa
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
U2 Lowest
Address
higher
Address
LCD1 Lowest
Address
higher
Address

By Jean de Dieu NGUIMFACK NDONGMO, PhD -EAA 2


Fig.5 1:
A simulator of a calculator

Case STUDY II: A simulator of a calculator


Fig. 4.2 is an interpretator a BASIC program using the 8052 microcontroller. It is used
to program the EPROM and to test the programs saved in the EPROM.
a) The analysis of the 8052 shows a part of the bus is used for data and addresses.
i) Give the references of this part
ii) Give the name and the meaning of the 8052’s pin used to control this part of the
bus and allow either data or addresses to used this part of the bus.
b) Give the name of circuit U3 and his internal structure knowing that it is formed by D
flip-flops.
c) Can data transited through U3 ? justify your answer
d) Name circuits U2 and U4 and calculate their capacity en Kb.
By Jean de Dieu NGUIMFACK NDONGMO, PhD -EAA 3
e) Write the selecting equations for chips U3 and U4
f) Name the pins P01 to P07
g) Indicate the state of diode D2 during the programmation of chip U4?
h) Find the programmation voltage
i) Present the address ranges of chips U2 and U4 in a table
j) What is the address of the 5120th register inside chip U4?
k) Indicate all the address ranges which have not been used
l) We want to add another chip 62256 selected when A15=1. Give the corresponding
address range and propose a logic-circuit for the selection of this new chip.

Fig.5 2:
By Jean de Dieu NGUIMFACK NDONGMO, PhD -EAA 4
Interpretator Of BASIC’s programs

You might also like