Professional Documents
Culture Documents
Micro-Controller Lesson-3
Micro-Controller Lesson-3
Direct It is most often used the direct addressing mode to access RAM locations 30 -7FH 05 minutes
Addressing
Mode The entire 128 bytes of RAM can be accessed.
The register bank locations are accessed by the register names.
Examples of
Example:
Immediate MOV A,4 ;is same as
Addressing
MOV A,R4 ;which means copy R4 into A 15 minutes
Contrast this with immediate addressing mode there is no “#” sign in the
operand
Example:
MOV R0, 40H ;save content of 40H in R0
10 Minutes
MOV 56H, A ;save content of A in 56H
The SFR (Special Function Register) can be accessed by their names or by their
addresses.
Example:
MOV 0E0H, #55H ;is the same as
MOV A, #55h ;load 55H into A
Activity/Application / Feedback:
What is the difference between Immediate and direct addressing modes?
Explain direct addressing mode.
Assignment:
Write 10 instructions in which direct addressing mode is used.
References:
Microcontroller and Embedded Systems by Muhammad Ali Mazidi
The 8051 Microcontroller by Scott Mckenzie