You are on page 1of 1

LESSON PLAN

Title / Topic: Addressing Modes


Lesson No. 27
Name of the Teacher: Engr. Shehzad Haneef
Subject Title & Code: Microcontrollers Programming and Applications (ELTR-363)
Technology: Electronics Year: 3rd

Specific Objectives: At the end of this lesson a student will be able to


 Define addressing modes
 Explain Register Indirect Addressing Mode
 Write instructions using Register Indirect Addressing Mode.
Introduction, Preparation, Motivation:
 Need of addressing
 Importance of Register Indirect Addressing Mode.
Presentation (Method of teaching)
Lecture & Discussion Method
Teaching Aids / Tools
White Board, Board Marker (Multi Colour)
Contents of Key points / Notes Time
the lesson Allocation

 A register is used as a pointer to the data. 05 minutes


Register
Indirect  Only register R0 and R1 are used for this purpose
Addressing
Mode
 R2 – R7 cannot be used to hold the address of an operand located in RAM
 When R0 and R1 hold the addresses of RAM locations, they must be preceded
by the “@” sign.
15 minutes
Example:
Examples
MOV A, @R0 ;move contents of RAM, whose address is held by R0 into A
MOV @R1, B ;move contents of B into RAM, whose address is held by R1
 R0 and R1 are the only registers that can be used for pointers in register
indirect addressing mode 10 Minutes
 Since R0 and R1 are 8 bits wide, their use is limited to access any information
in the internal RAM
 Whether accessing externally connected RAM or on-chip ROM, we need 16-
bit pointer (In such case, the DPTR register is used)
Indexed addressing mode is widely used in accessing data elements of look-up
Indexed table entries located in the program ROM
Addressing
 The instruction used for this purpose is MOVC A, @A+DPTR
Mode
The contents of A are added to the 16-bit register DPTR to form the 16-bit
address of the needed data

Activity/Application / Feedback:
 What is the difference between register direct and direct indirect addressing modes?
 Explain register indirect addressing mode.
Assignment:
 Write 10 instructions in which register indirect addressing mode is used.
References:
 Microcontroller and Embedded Systems by Muhammad Ali Mazidi
 The 8051 Microcontroller by Scott Mckenzie

You might also like