4
Most read
5
Most read
7
Most read
ADDRESSING
MODES OF 8051
Prepared By,
Dr. N. AISHWARYA,
R.M.K College of Engineering and Technology
Definition:
The ways in which the operands are represented in an instruction is
called addressing modes.
• In 8051, there are 5 addressing modes.
CLASSIFICATION OF ADDRESSING MODES
 Immediate Addressing Mode
 Register Addressing Mode
 Direct Addressing Mode
 Register-Indirect Addressing Mode
 Indexed Addressing Mode
IMMEDIATE ADDRESSING MODE
• The data will be specified directly in the source operand.
• Since 8051 Microcontroller is a 8 bit microcontroller, only 8 bit data (2 decimal digits) can
be specified.
• The immediate data will be followed by the symbol #
Example:
 MOV A, #04H- The 8 bit data 04H will be moved to accumulator (A) register.
 MOV R3, #0AE H- The 8 bit data AE is moved to R3 register.
Note: In 8051, A, B and R0-R7 registers will be generally used.
Also, whenever the data starts from A to F, the data must be preceded by 0.
Before Execution After Execution
The value of A---->09 The value of A---->04
REGISTER ADDRESSING MODE
• In this mode, both source and destination operands are registers.
Example:
 MOV A, R0- The data which resides in R0 register is moved/copied to A register.
 ADD A, R1- The data in R1 register and A register are summed up and the result is stored
in A register.
Note: Both the source and the destination operand cannot be register banks(R0-R7). For eg,
MOV R3,R7 is not possible. The sequence can be,
MOV A, R7
MOV R3, A
Before Execution After Execution
The value of A---->0C
The value of R0--->09
The value of A---->09
The value of R0--->09
Before Execution After Execution
The value of A---->0C
The value of R1--->09
The value of A---->15
The value of R1--->09
DIRECT ADDRESSING MODE
• Here the address of the data is specified either in source operand or destination operand.
Example:
 MOV R2, 04 - The data which resides in memory location 04H is moved to R2 register.
Don’t use # symbol, otherwise 04 becomes data rather than address.
Only the internal memory address (00 to 7F) will be used in this mode.
 Assume the data in 04 address----> 0C.
Before Execution After Execution
The value of R2---->09 The value of R2---->0C
REGISTER INDIRECT ADDRESSING MODE
• As the name suggests, the address of the memory location which contains the data (will be
enclosed in square brackets) is specified by registers.
• The @ symbol in the instruction specifies this addressing mode.
• Only R0 and R1 registers can be accessed via this mode.
Example:
 MOV A, @R0-Assume the R0 register is pointing to location 80H. Then the value say 0E
in 80H is moved to A register.
MOV @R1, 85-Assume the value in 85H is 02. This data is moved to the memory location
pointed by R1 register.
In other words, this example moves data from one location to another location.
Before Execution After Execution
The value of A--->0C The value of A---->0E
INDEXED ADDRESSING MODE
• In this mode, the effective address is formed by summing up the base register and
accumulator register.
• Base registers-PC (Program counter), DPTR (Data pointer register)
• The destination operand will be always A register.
• The source memory can be accessed only by program memory which is represented by
letter C (means code) in the instruction.
Example:
 MOVC A, @A+PC- Assume the A register holds the value 07H and the PC has the value
4100H. Then, the data in memory location 4107H(4100+07) is moved to A register.
MOVC A, @A+DPTR- The same explanation holds good for this instruction also.
THANK YOU!!!

More Related Content

PPT
Addressing modes of 8051
PPT
8085 MICROPROCESSOR
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
PPT
8085 interrupts
PPT
8085 microproceesor ppt
PPT
8051 Addressing Modes
PPTX
Microprocessor 8086 instructions
PPTX
8085 microprocessor
Addressing modes of 8051
8085 MICROPROCESSOR
8051 Microcontroller PPT's By Er. Swapnil Kaware
8085 interrupts
8085 microproceesor ppt
8051 Addressing Modes
Microprocessor 8086 instructions
8085 microprocessor

What's hot (20)

PPTX
8051 MICROCONTROLLER ARCHITECTURE.pptx
PPT
8051 block diagram
PPT
8051 instruction set
PDF
8051 interfacing
PDF
Seven segment interfacing with 8051.pdf
PPTX
Architecture of 8051
PPT
Memory organization of 8051
PPTX
8255 PPI
PPTX
Branch instructions in 8051 micrcocontroller
PPTX
Interfacing external memory in 8051
PPTX
Interfacing Stepper motor with 8051
PPT
Microcontroller-8051.ppt
PPT
Architecture of 8086 Microprocessor
PPTX
I/O port programming in 8051
PDF
Keypad Interfacing with 8051 Microcontroller
PPTX
8051 timer counter
PPT
pin-diagram-details-of-8086-microprocessor
DOCX
8085 interfacing with memory chips
PDF
DAC Interfacing with 8051.pdf
PPTX
SHLD and LHLD instruction
8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 block diagram
8051 instruction set
8051 interfacing
Seven segment interfacing with 8051.pdf
Architecture of 8051
Memory organization of 8051
8255 PPI
Branch instructions in 8051 micrcocontroller
Interfacing external memory in 8051
Interfacing Stepper motor with 8051
Microcontroller-8051.ppt
Architecture of 8086 Microprocessor
I/O port programming in 8051
Keypad Interfacing with 8051 Microcontroller
8051 timer counter
pin-diagram-details-of-8086-microprocessor
8085 interfacing with memory chips
DAC Interfacing with 8051.pdf
SHLD and LHLD instruction
Ad

Similar to Addressing modes of 8051 (20)

PPTX
2. Instruction Set.pptx huishiuhfuidhiuhdfuhdu
PPT
microprocessor and microcontroller notes ppt
PPTX
Addressing modes
PPT
addressingmodes8051.ppt
PPTX
Microcontroller 8051 addressing modes
PPTX
Expanation about Addressing Mode of 8051
PPTX
Addressing modes
PPTX
Lecture 10
PPTX
8051 Addressing modes
PPTX
Module 3.1_Instruction Types and Addressing modes.pptx
PPTX
Addressing modes
PPTX
Addressing modes
PDF
addressing-mode-of-8051.pdf
PPTX
Lecture 11
PPSX
8051 addressing modes
PPTX
Addressing Modes
PPTX
Addressing modes of 8086
PPTX
Different addressing modes in microcontrollers
PDF
A Comprehensive Guide to 8051 Microcontroller Addressing Modes and Instructions
PPT
MC-MODULE-2.ppt includes addressing modes , instruction set etc...
2. Instruction Set.pptx huishiuhfuidhiuhdfuhdu
microprocessor and microcontroller notes ppt
Addressing modes
addressingmodes8051.ppt
Microcontroller 8051 addressing modes
Expanation about Addressing Mode of 8051
Addressing modes
Lecture 10
8051 Addressing modes
Module 3.1_Instruction Types and Addressing modes.pptx
Addressing modes
Addressing modes
addressing-mode-of-8051.pdf
Lecture 11
8051 addressing modes
Addressing Modes
Addressing modes of 8086
Different addressing modes in microcontrollers
A Comprehensive Guide to 8051 Microcontroller Addressing Modes and Instructions
MC-MODULE-2.ppt includes addressing modes , instruction set etc...
Ad

Recently uploaded (20)

PDF
Introduction to Machine Learning -Basic concepts,Models and Description
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PDF
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
PDF
IAE-V2500 Engine for Airbus Family 319/320
PPTX
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
PPTX
Unit IImachinemachinetoolopeartions.pptx
PPTX
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
PPTX
quantum theory on the next future in.pptx
PPTX
IOP Unit 1.pptx for btech 1st year students
PPTX
Design ,Art Across Digital Realities and eXtended Reality
PPT
Basics Of Pump types, Details, and working principles.
PPTX
Real Estate Management PART 1.pptxFFFFFFFFFFFFF
PPTX
chapter 1.pptx dotnet technology introduction
PDF
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
PPTX
Solar energy pdf of gitam songa hemant k
PPT
UNIT-I Machine Learning Essentials for 2nd years
PPTX
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
PPT
Comprehensive Java Training Deck - Advanced topics
PPTX
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
PPTX
1. Effective HSEW Induction Training - EMCO 2024, O&M.pptx
Introduction to Machine Learning -Basic concepts,Models and Description
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
IAE-V2500 Engine for Airbus Family 319/320
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
Unit IImachinemachinetoolopeartions.pptx
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
quantum theory on the next future in.pptx
IOP Unit 1.pptx for btech 1st year students
Design ,Art Across Digital Realities and eXtended Reality
Basics Of Pump types, Details, and working principles.
Real Estate Management PART 1.pptxFFFFFFFFFFFFF
chapter 1.pptx dotnet technology introduction
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
Solar energy pdf of gitam songa hemant k
UNIT-I Machine Learning Essentials for 2nd years
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
Comprehensive Java Training Deck - Advanced topics
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
1. Effective HSEW Induction Training - EMCO 2024, O&M.pptx

Addressing modes of 8051

  • 1. ADDRESSING MODES OF 8051 Prepared By, Dr. N. AISHWARYA, R.M.K College of Engineering and Technology
  • 2. Definition: The ways in which the operands are represented in an instruction is called addressing modes. • In 8051, there are 5 addressing modes.
  • 3. CLASSIFICATION OF ADDRESSING MODES  Immediate Addressing Mode  Register Addressing Mode  Direct Addressing Mode  Register-Indirect Addressing Mode  Indexed Addressing Mode
  • 4. IMMEDIATE ADDRESSING MODE • The data will be specified directly in the source operand. • Since 8051 Microcontroller is a 8 bit microcontroller, only 8 bit data (2 decimal digits) can be specified. • The immediate data will be followed by the symbol # Example:  MOV A, #04H- The 8 bit data 04H will be moved to accumulator (A) register.  MOV R3, #0AE H- The 8 bit data AE is moved to R3 register. Note: In 8051, A, B and R0-R7 registers will be generally used. Also, whenever the data starts from A to F, the data must be preceded by 0. Before Execution After Execution The value of A---->09 The value of A---->04
  • 5. REGISTER ADDRESSING MODE • In this mode, both source and destination operands are registers. Example:  MOV A, R0- The data which resides in R0 register is moved/copied to A register.  ADD A, R1- The data in R1 register and A register are summed up and the result is stored in A register. Note: Both the source and the destination operand cannot be register banks(R0-R7). For eg, MOV R3,R7 is not possible. The sequence can be, MOV A, R7 MOV R3, A Before Execution After Execution The value of A---->0C The value of R0--->09 The value of A---->09 The value of R0--->09 Before Execution After Execution The value of A---->0C The value of R1--->09 The value of A---->15 The value of R1--->09
  • 6. DIRECT ADDRESSING MODE • Here the address of the data is specified either in source operand or destination operand. Example:  MOV R2, 04 - The data which resides in memory location 04H is moved to R2 register. Don’t use # symbol, otherwise 04 becomes data rather than address. Only the internal memory address (00 to 7F) will be used in this mode.  Assume the data in 04 address----> 0C. Before Execution After Execution The value of R2---->09 The value of R2---->0C
  • 7. REGISTER INDIRECT ADDRESSING MODE • As the name suggests, the address of the memory location which contains the data (will be enclosed in square brackets) is specified by registers. • The @ symbol in the instruction specifies this addressing mode. • Only R0 and R1 registers can be accessed via this mode. Example:  MOV A, @R0-Assume the R0 register is pointing to location 80H. Then the value say 0E in 80H is moved to A register. MOV @R1, 85-Assume the value in 85H is 02. This data is moved to the memory location pointed by R1 register. In other words, this example moves data from one location to another location. Before Execution After Execution The value of A--->0C The value of A---->0E
  • 8. INDEXED ADDRESSING MODE • In this mode, the effective address is formed by summing up the base register and accumulator register. • Base registers-PC (Program counter), DPTR (Data pointer register) • The destination operand will be always A register. • The source memory can be accessed only by program memory which is represented by letter C (means code) in the instruction. Example:  MOVC A, @A+PC- Assume the A register holds the value 07H and the PC has the value 4100H. Then, the data in memory location 4107H(4100+07) is moved to A register. MOVC A, @A+DPTR- The same explanation holds good for this instruction also.