SlideShare a Scribd company logo
ADDRESSING MODE OF 8051
MICROCONTROLLER
DR M A Maniar
What is an Addressing Mode?
• An Addressing Mode is a way to locate a target Data,
which is also called as Operand.
• The 8051 Family of Microcontrollers allows five types of
Addressing Modes for addressing the Operands. They
are:
• Immediate Addressing
• Register Addressing
• Direct Addressing
• Register – Indirect Addressing
• Indexed Addressing
Immediate Addressing
• In Immediate Addressing mode, the operand, which follows the Opcode, is a
constant data of either 8 or 16 bits.
• The constant value to be stored is specified in the instruction itself rather than
taking from a register.
• The destination register to which the constant data must be copied should be the
same size as the operand mentioned in the instruction.
Example: MOV A, #030H
Explanation: Here, the Accumulator is loaded with 30 (hexadecimal).
The # in the operand indicates that it is a data and not the address of a Register.
• Immediate Addressing is very fast as the data to be loaded is given in the
instruction itself.
Register Addressing
• In the 8051 Microcontroller Memory Organization Tutorial, we have seen
the organization of RAM and four banks of Working Registers with eight
Registers in each bank.
• In Register Addressing mode, one of the eight registers (R0 – R7) is
specified as Operand in the Instruction.
Example: MOV A, R5
Explanation: Here, the 8-bit content of the Register R5 of Bank0 is
moved to the Accumulator
Note: It is important to select the appropriate Bank with the help
of PSW Register.
Direct Addressing
• In Direct Addressing Mode, the address of the data is specified as
the Operand in the instruction.
• Using Direct Addressing Mode, we can access any register or on-
chip variable.
• This includes general purpose RAM, SFRs, I/O Ports, Control
registers.
Example: MOV A, 47H
• Explanation: Here, the data in the RAM location 47H is
moved to the Accumulator.
Register Indirect Addressing
• In the Indirect Addressing Mode or Register Indirect Addressing Mode,
the address of the Operand is specified as the content of a Register.
Example: MOV A, @R1
Explanation :
The @ symbol indicates that the addressing mode is indirect.
If the contents of R1 is 56H,
For example, then the operand is in the internal RAM location 56H.
If the contents of the RAM location 56H is 24H, then 24H is move into
accumulator.
• Only R0 and R1 are allowed in Indirect Addressing Mode. These
register in the indirect addressing mode are called as Pointer registers.
Indexed Addressing Mode
• With Indexed Addressing Mode, the effective address of the Operand is the sum of a base
register and an offset register.
• The Base Register can be either Data Pointer (DPTR) or Program Counter (PC) while the Offset
register is the Accumulator (A).
• In Indexed Addressing Mode, only MOVC and JMP instructions can be used.
• Indexed Addressing Mode is useful when retrieving data from look-up tables.
Example: MOVC A, @A+DPTR
Explanation : Here, the address for the operand is the sum of contents of DPTR and Accumulator.
NOTE: Some authors and textbooks add few other Addressing Modes like Absolute
Addressing Mode, Relative Addressing Mode and Long Addressing Mode.

More Related Content

PPTX
3. Addressing Modes in 8085 microprocessor.pptx
PPTX
addressing modes of microcontrooller 8051
PPSX
8051 addressing modes
PDF
L-3microproceessors and microcontrollers.pdf
PPTX
Addressing modes of 8085
PPT
microprocessor and microcontroller notes ppt
PPS
Addressing modes of 8085
PPT
addressingmodes8051.ppt
3. Addressing Modes in 8085 microprocessor.pptx
addressing modes of microcontrooller 8051
8051 addressing modes
L-3microproceessors and microcontrollers.pdf
Addressing modes of 8085
microprocessor and microcontroller notes ppt
Addressing modes of 8085
addressingmodes8051.ppt

Similar to Expanation about Addressing Mode of 8051 (20)

PPT
Module-02 Instruction Set in 8051 and their usage
PPTX
8051 addressing
PDF
addressing-mode-of-8051.pdf
PPTX
Addressing modes of 8051
PPTX
Microcontroller .pptx
PDF
Addressing modes.pdf for engineering student
PPT
MC-MODULE-2.ppt includes addressing modes , instruction set etc...
PDF
A Comprehensive Guide to 8051 Microcontroller Addressing Modes and Instructions
PPT
Addressing mode of 8051
PDF
VTU 4th Semester ECE dept Microcontroller lecture slides module 2
PPTX
Lecture 10
PDF
8051 instruction set
PPTX
Addressing modes
PPT
Addressing modes of 8051
PPTX
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
PPT
PPTX
Addressing mode & data transfer instruction of 8085
PPTX
Addressing mode
PPTX
MICROCONTROLLERS-module2 (7).pptx
PPTX
ADDRESSING MODES OF 8085
Module-02 Instruction Set in 8051 and their usage
8051 addressing
addressing-mode-of-8051.pdf
Addressing modes of 8051
Microcontroller .pptx
Addressing modes.pdf for engineering student
MC-MODULE-2.ppt includes addressing modes , instruction set etc...
A Comprehensive Guide to 8051 Microcontroller Addressing Modes and Instructions
Addressing mode of 8051
VTU 4th Semester ECE dept Microcontroller lecture slides module 2
Lecture 10
8051 instruction set
Addressing modes
Addressing modes of 8051
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
Addressing mode & data transfer instruction of 8085
Addressing mode
MICROCONTROLLERS-module2 (7).pptx
ADDRESSING MODES OF 8085
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Mechanical Engineering MATERIALS Selection
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
composite construction of structures.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
additive manufacturing of ss316l using mig welding
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Well-logging-methods_new................
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Sustainable Sites - Green Building Construction
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
web development for engineering and engineering
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Mechanical Engineering MATERIALS Selection
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Automation-in-Manufacturing-Chapter-Introduction.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
composite construction of structures.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
R24 SURVEYING LAB MANUAL for civil enggi
additive manufacturing of ss316l using mig welding
Model Code of Practice - Construction Work - 21102022 .pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Well-logging-methods_new................
Lecture Notes Electrical Wiring System Components
Sustainable Sites - Green Building Construction
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
web development for engineering and engineering
Ad

Expanation about Addressing Mode of 8051

  • 1. ADDRESSING MODE OF 8051 MICROCONTROLLER DR M A Maniar
  • 2. What is an Addressing Mode? • An Addressing Mode is a way to locate a target Data, which is also called as Operand. • The 8051 Family of Microcontrollers allows five types of Addressing Modes for addressing the Operands. They are: • Immediate Addressing • Register Addressing • Direct Addressing • Register – Indirect Addressing • Indexed Addressing
  • 3. Immediate Addressing • In Immediate Addressing mode, the operand, which follows the Opcode, is a constant data of either 8 or 16 bits. • The constant value to be stored is specified in the instruction itself rather than taking from a register. • The destination register to which the constant data must be copied should be the same size as the operand mentioned in the instruction. Example: MOV A, #030H Explanation: Here, the Accumulator is loaded with 30 (hexadecimal). The # in the operand indicates that it is a data and not the address of a Register. • Immediate Addressing is very fast as the data to be loaded is given in the instruction itself.
  • 4. Register Addressing • In the 8051 Microcontroller Memory Organization Tutorial, we have seen the organization of RAM and four banks of Working Registers with eight Registers in each bank. • In Register Addressing mode, one of the eight registers (R0 – R7) is specified as Operand in the Instruction. Example: MOV A, R5 Explanation: Here, the 8-bit content of the Register R5 of Bank0 is moved to the Accumulator Note: It is important to select the appropriate Bank with the help of PSW Register.
  • 5. Direct Addressing • In Direct Addressing Mode, the address of the data is specified as the Operand in the instruction. • Using Direct Addressing Mode, we can access any register or on- chip variable. • This includes general purpose RAM, SFRs, I/O Ports, Control registers. Example: MOV A, 47H • Explanation: Here, the data in the RAM location 47H is moved to the Accumulator.
  • 6. Register Indirect Addressing • In the Indirect Addressing Mode or Register Indirect Addressing Mode, the address of the Operand is specified as the content of a Register. Example: MOV A, @R1 Explanation : The @ symbol indicates that the addressing mode is indirect. If the contents of R1 is 56H, For example, then the operand is in the internal RAM location 56H. If the contents of the RAM location 56H is 24H, then 24H is move into accumulator. • Only R0 and R1 are allowed in Indirect Addressing Mode. These register in the indirect addressing mode are called as Pointer registers.
  • 7. Indexed Addressing Mode • With Indexed Addressing Mode, the effective address of the Operand is the sum of a base register and an offset register. • The Base Register can be either Data Pointer (DPTR) or Program Counter (PC) while the Offset register is the Accumulator (A). • In Indexed Addressing Mode, only MOVC and JMP instructions can be used. • Indexed Addressing Mode is useful when retrieving data from look-up tables. Example: MOVC A, @A+DPTR Explanation : Here, the address for the operand is the sum of contents of DPTR and Accumulator. NOTE: Some authors and textbooks add few other Addressing Modes like Absolute Addressing Mode, Relative Addressing Mode and Long Addressing Mode.