SlideShare a Scribd company logo
1 of 15
Nitin Ahire
XIE,Mahim
Prof. Nitin Ahire 1
 The CPU can access data various ways
 The data could be in a register, or memory
or as an immediate value
 The various ways of accessing data are
called addressing modes.
Prof. Nitin Ahire 2
1)Direct addressing mode
2)Indirect addressing mode
3)Register addressing
4)Register specific addressing (optional)
5)Immediate addressing
6)External Addressing ( Index )
a) Code access b) Data access
Prof. Nitin Ahire 3
 In this mode the operand is specified by an
8-bit address field In the instruction.
 One can access all the 128 bytes of internal
RAM locations and each SFR.
 If the MSB bit = 0 then the location is within
on chip internal RAM. If MSB bit = 1
then the location is SFR.
Prof. Nitin Ahire 4
 The location 00h to 7Fh to address the
internal RAM .
 SFR addresses from 80h to FF h
 e.g. MOV A,40h
MOV R0,14h
Prof. Nitin Ahire 5
 In this addressing mode, the instruction
specifics a register which contains address
of an operand
i.e. the register hold the actual address that
will be used in the data move operation.
 The R0 and R1 of each bank can be used as an
index or pointer to memory location
Prof. Nitin Ahire 6
 The sign @ indicates the register acts as a
pointer to memory locations
 E.g. MOV A,@ R1
Note : only register R0 and R1 can be used
for indirect addressing mode .
MOV A,@R2 invalid instruction.
Prof. Nitin Ahire 7
 Each bank consist of register R0 to R7 can be
used as general purpose register for selection
of bank register, the user has to modify the
two bits of PSW
 These register can be used to stored the
address or data in the register addressing
mode
Prof. Nitin Ahire 8
 E.g.
MOV R2,A
MOV A, R1
MOV A,R7
Note: MOV R2,R7 is an invalid instruction
Prof. Nitin Ahire 9
 In this addressing mode the instruction refer
to a specific registers such as accumulator or
data pointer
 Example:
DA A
SWAP A
Prof. Nitin Ahire 10
 This method is the simplest method to get
the data.
 In this addressing mode the source operand is
a constant rather then a variable.
 As the data source is a part of instruction
 The # sign indicates that the data followed is
immediate operand.
Prof. Nitin Ahire 11
 E.g.
MOV A,#30h
MOV P1,#0FF
MOV DPTR, #1234h
Prof. Nitin Ahire 12
(a) Code access (ROM access)
 Using these instructions only program
memory can be accessed.
 This addressing mode is preferred for
reading look up tables in the program
memory.
 Either DPTR or PC can be used as pointer.
Prof. Nitin Ahire 13
 E.g.
MOVC A,@A+DPTR
MOVC A,@A+PC
Prof. Nitin Ahire 14
(b) Data access (RAM access)
 Using this addressing mode the programmer
can access the external Data memory
 E.g. MOVX A,@DPTR
MOVX @R0,A
Prof. Nitin Ahire 15

More Related Content

What's hot

Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086samirbharat77
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set Nitin Ahire
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051Dr. AISHWARYA N
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSORAkhila Rahul
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA
 
Special of 80386 registers
Special of 80386 registersSpecial of 80386 registers
Special of 80386 registersTanmoy Mazumder
 
8085 instructions and addressing modes
8085 instructions and addressing modes8085 instructions and addressing modes
8085 instructions and addressing modesSuchismita Paul
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386PDFSHARE
 
8086 Microprocessor powerpoint
8086  Microprocessor  powerpoint8086  Microprocessor  powerpoint
8086 Microprocessor powerpointRandhir Kumar
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecturesamaa ali
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formatsMazin Alwaaly
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kVijay Kumar
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modesVijay Kumar
 

What's hot (20)

Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Interrupts of microcontroller 8051
Interrupts of microcontroller 8051Interrupts of microcontroller 8051
Interrupts of microcontroller 8051
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
Addressing modes/Addressing Mode with illustration/ Addressing mode in 8086
 
8051 micro controllers Instruction set
8051 micro controllers Instruction set 8051 micro controllers Instruction set
8051 micro controllers Instruction set
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSOR
 
SAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSORSAURABH MITRA-8086 MICROPROCESSOR
SAURABH MITRA-8086 MICROPROCESSOR
 
ADDRESSING MODE
ADDRESSING MODEADDRESSING MODE
ADDRESSING MODE
 
Special of 80386 registers
Special of 80386 registersSpecial of 80386 registers
Special of 80386 registers
 
Stack and subroutine
Stack and subroutineStack and subroutine
Stack and subroutine
 
8085 instructions and addressing modes
8085 instructions and addressing modes8085 instructions and addressing modes
8085 instructions and addressing modes
 
Addressing modes of 80386
Addressing modes of 80386Addressing modes of 80386
Addressing modes of 80386
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
8086 Microprocessor powerpoint
8086  Microprocessor  powerpoint8086  Microprocessor  powerpoint
8086 Microprocessor powerpoint
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formats
 
Interrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.kInterrupts on 8086 microprocessor by vijay kumar.k
Interrupts on 8086 microprocessor by vijay kumar.k
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
 

Similar to Addressing mode of 8051

microprocessor and microcontroller notes ppt
microprocessor and microcontroller notes pptmicroprocessor and microcontroller notes ppt
microprocessor and microcontroller notes pptmananjain543
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction setStefan Oprea
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modessb108ec
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
Addressing modes of 8051
Addressing modes  of 8051Addressing modes  of 8051
Addressing modes of 8051Bharath Reddy
 
432_17EC563_8051-microcontroller-moving-data_notes.pdf
432_17EC563_8051-microcontroller-moving-data_notes.pdf432_17EC563_8051-microcontroller-moving-data_notes.pdf
432_17EC563_8051-microcontroller-moving-data_notes.pdfShreeKrishnaTarai
 
8051 Programming (1).pptx
8051 Programming (1).pptx8051 Programming (1).pptx
8051 Programming (1).pptxDhyeayaParmar
 
ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptxKajalOberoi1
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modesbalbirvirdi
 
ADDRESSING MODES OF 8085
ADDRESSING MODES OF 8085 ADDRESSING MODES OF 8085
ADDRESSING MODES OF 8085 LingalaSowjanya
 
Addressing mode
Addressing modeAddressing mode
Addressing modeilakkiya
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 

Similar to Addressing mode of 8051 (20)

addressing-mode-of-8051.pdf
addressing-mode-of-8051.pdfaddressing-mode-of-8051.pdf
addressing-mode-of-8051.pdf
 
microprocessor and microcontroller notes ppt
microprocessor and microcontroller notes pptmicroprocessor and microcontroller notes ppt
microprocessor and microcontroller notes ppt
 
addressingmodes8051.ppt
addressingmodes8051.pptaddressingmodes8051.ppt
addressingmodes8051.ppt
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modes
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Addressing modes of 8051
Addressing modes  of 8051Addressing modes  of 8051
Addressing modes of 8051
 
Microcontroller .pptx
Microcontroller .pptxMicrocontroller .pptx
Microcontroller .pptx
 
432_17EC563_8051-microcontroller-moving-data_notes.pdf
432_17EC563_8051-microcontroller-moving-data_notes.pdf432_17EC563_8051-microcontroller-moving-data_notes.pdf
432_17EC563_8051-microcontroller-moving-data_notes.pdf
 
8051 Programming (1).pptx
8051 Programming (1).pptx8051 Programming (1).pptx
8051 Programming (1).pptx
 
addressing modes
addressing modesaddressing modes
addressing modes
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptx
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modes
 
ADDRESSING MODES OF 8085
ADDRESSING MODES OF 8085 ADDRESSING MODES OF 8085
ADDRESSING MODES OF 8085
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 

More from Nitin Ahire

Microprocessor 8086 8087_nitin ahire
Microprocessor 8086 8087_nitin ahireMicroprocessor 8086 8087_nitin ahire
Microprocessor 8086 8087_nitin ahireNitin Ahire
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 MicrocontrollerNitin Ahire
 
8085 ppi 8255 and 8155
8085 ppi 8255 and 81558085 ppi 8255 and 8155
8085 ppi 8255 and 8155Nitin Ahire
 
8051 singed number concept [compatibility mode]
8051 singed  number concept [compatibility mode]8051 singed  number concept [compatibility mode]
8051 singed number concept [compatibility mode]Nitin Ahire
 
8051 (microcontroller)class1
8051 (microcontroller)class18051 (microcontroller)class1
8051 (microcontroller)class1Nitin Ahire
 
Serial communication in 8085
Serial communication in 8085Serial communication in 8085
Serial communication in 8085Nitin Ahire
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085Nitin Ahire
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085Nitin Ahire
 

More from Nitin Ahire (9)

Microprocessor 8086 8087_nitin ahire
Microprocessor 8086 8087_nitin ahireMicroprocessor 8086 8087_nitin ahire
Microprocessor 8086 8087_nitin ahire
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
8085 ppi 8255 and 8155
8085 ppi 8255 and 81558085 ppi 8255 and 8155
8085 ppi 8255 and 8155
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 
8051 singed number concept [compatibility mode]
8051 singed  number concept [compatibility mode]8051 singed  number concept [compatibility mode]
8051 singed number concept [compatibility mode]
 
8051 (microcontroller)class1
8051 (microcontroller)class18051 (microcontroller)class1
8051 (microcontroller)class1
 
Serial communication in 8085
Serial communication in 8085Serial communication in 8085
Serial communication in 8085
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
Interrupt of 8085
Interrupt of 8085Interrupt of 8085
Interrupt of 8085
 

Recently uploaded

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Recently uploaded (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Addressing mode of 8051

  • 2.  The CPU can access data various ways  The data could be in a register, or memory or as an immediate value  The various ways of accessing data are called addressing modes. Prof. Nitin Ahire 2
  • 3. 1)Direct addressing mode 2)Indirect addressing mode 3)Register addressing 4)Register specific addressing (optional) 5)Immediate addressing 6)External Addressing ( Index ) a) Code access b) Data access Prof. Nitin Ahire 3
  • 4.  In this mode the operand is specified by an 8-bit address field In the instruction.  One can access all the 128 bytes of internal RAM locations and each SFR.  If the MSB bit = 0 then the location is within on chip internal RAM. If MSB bit = 1 then the location is SFR. Prof. Nitin Ahire 4
  • 5.  The location 00h to 7Fh to address the internal RAM .  SFR addresses from 80h to FF h  e.g. MOV A,40h MOV R0,14h Prof. Nitin Ahire 5
  • 6.  In this addressing mode, the instruction specifics a register which contains address of an operand i.e. the register hold the actual address that will be used in the data move operation.  The R0 and R1 of each bank can be used as an index or pointer to memory location Prof. Nitin Ahire 6
  • 7.  The sign @ indicates the register acts as a pointer to memory locations  E.g. MOV A,@ R1 Note : only register R0 and R1 can be used for indirect addressing mode . MOV A,@R2 invalid instruction. Prof. Nitin Ahire 7
  • 8.  Each bank consist of register R0 to R7 can be used as general purpose register for selection of bank register, the user has to modify the two bits of PSW  These register can be used to stored the address or data in the register addressing mode Prof. Nitin Ahire 8
  • 9.  E.g. MOV R2,A MOV A, R1 MOV A,R7 Note: MOV R2,R7 is an invalid instruction Prof. Nitin Ahire 9
  • 10.  In this addressing mode the instruction refer to a specific registers such as accumulator or data pointer  Example: DA A SWAP A Prof. Nitin Ahire 10
  • 11.  This method is the simplest method to get the data.  In this addressing mode the source operand is a constant rather then a variable.  As the data source is a part of instruction  The # sign indicates that the data followed is immediate operand. Prof. Nitin Ahire 11
  • 12.  E.g. MOV A,#30h MOV P1,#0FF MOV DPTR, #1234h Prof. Nitin Ahire 12
  • 13. (a) Code access (ROM access)  Using these instructions only program memory can be accessed.  This addressing mode is preferred for reading look up tables in the program memory.  Either DPTR or PC can be used as pointer. Prof. Nitin Ahire 13
  • 14.  E.g. MOVC A,@A+DPTR MOVC A,@A+PC Prof. Nitin Ahire 14
  • 15. (b) Data access (RAM access)  Using this addressing mode the programmer can access the external Data memory  E.g. MOVX A,@DPTR MOVX @R0,A Prof. Nitin Ahire 15