SlideShare une entreprise Scribd logo
1  sur  31
8051 ADDRESSING MODES (CONT.)
By: Mayank Garg
2013H140040H
“What is an addressing mode ?“
“What is an addressing mode ?“
Addressing mode is the way of addressing a
memory location in instruction. Microcntroller
needs data or operands on which the operation is
to be performed. The method of specifying source
of operand and output of result in an instruction is
known as addressing mode.
“What is an addressing mode ?“
Addressing mode is the way of addressing a memory
location in instruction. Microcntroller needs data or
operands on which the operation is to be performed. The
method of specifying source of operand and output of result
in an instruction is known as addressing mode.
Now question arises:
How many types of addressing
modes?
ADDRESSING MODES
The 8051 instructions use eight addressing
modes. These are:
1. Register
2. Direct
3. Indirect
4. Immediate
5. Relative
6. Absolute
7. Indexed
8. Long
ABSOLUTE ADDRESSING MODE
 There are only two instructions that use this
addressing:
 ACALL (absolute call)
 AJMP (absolute jump).
 These instructions perform branching within the
current 2K page of program memory.
 The branch address is obtained by successively
concatenating the five high-order bits of the
program counter, bits 5 – 7 of the op-code,and
the second byte of the instruction.
CONTD…
 The operation of the AJMP instruction is detailed
below:
 AJMP address
(PC) <- (PC) + 2
(PC10-PC0) <- address10 - address0
 The eleven least significant bits of the PC are
altered. The five most significant bits remain the
same. This means the AJMP will only allow you
to jump to a location in the same 2K page as the
instruction directly after the jump.
For example:
If the label THERE represents an instruction at address 0F46H and the
instruction AJMP THERE is in memory at locations 0900H and 0901H, the
assembler will encode the instruction as
11100001 1st byte (A10 - A8 + opcode)
01000110 2nd byte (A7 - A0)
The underlined bits are the low-order 11 bits of the destination address, 0F46H =
0000111101000110B. The upper five bits in the program counter will not change
when this instruction executes. Note that both the AJMP instruction and the
destination are within the 2K page bounded by 0800H and 0FFFH, and therefore
have the upper five address bits in common.
ANY Query regarding
this??
Lets move to next….
RELATIVE ADDRESING
 Relative addressing is used only with certain
jump instructions. The system executes a jump
by changing the contents of the PC to the
address of the next instruction to be executed.
 For example, if we wished to jump to the
instruction stored at location 4EH in code
memory, the PC would be loaded with 4EH.
Then, during the next execution cycle the
contents of the PC (4EH) are placed on the
address bus and the instruction at 4EH is
retrieved.
SJUMP is an unconditional jump and is a 2-byte
instruction. The number following it is an offset address. If
this instruction were stored in code memory at locations
100H and 101H, as shown below:
100H 80H
101H 06H
---The PC contains 100H, therefore the instruction 80H is
read into the IR.
---The instruction is decoded as the 2-byte SJMP
instruction.
---The PC is incremented so that the operand may be
retrieved.
---The operand is read from code memory and the PC is
incremented again (because this is a 2-bye instruction).
---The operand (06H) is added to the PC (102H + 06H =
108H).
ANY Query regarding
this??
Lets move to next….
INDEXED ADDRESSING MODE
 In this mode the 16-bit address in a base register is
added to a positive offset to form an effective address
for the jump indirect instruction
 JMP @A+DPTR
 the two move code byte instructions
 MOVC A,@A+DPTR and
 MOVC A,@A+PC.
 The base register in the jump instruction is the data
pointer and the positive offset is held in the
accumulator.
 For the move instructions the base register can either
be the data pointer or the program counter, and again
the positive offset is in the accumulator.
Example:
JMP @A+DPTR (PC)  (A)
+(DPTR)
MOVC A,@A+DPTR (A)  ((A) +
(DPTR))
MOVC A,@A+PC (PC)  (PC)
+ 1
(A)  ((A) +
(PC))
ANY Query regarding
this??
Lets move to next….
LONG ADDRESSING MODE
 Only two instructions use this addressing mode.
 These instructions are:
 LCALL addr16
 LJMP addr16.
 Both of these are three byte instructions with the op-
code being the first byte and the following two bytes
are the address high-byte and address low-byte
respectively.
 These instructions enable the program to branch to
anywhere within the full 64 K-bytes of program
memory address space
ANY Query regarding
this??
Lets move to next….
INDIRECT ADDRESSING MODE
 In this mode of addressing the instruction
performs an operation on the data whose
address is contained in register R0 or R1.
Instructions using indirect addressing are
single byte instructions.
 In 8051 assembly language the symbol @
before R0 or
 SUBB A, @R0 R1
(denotes indirect addressing.)
This instruction performs the operation:
(A) (A) (C)  ((R0)).
For example,
***if you had an array of 8-bit numbers stored in
memory, starting at address 30H, you may wish to examine
the contents of each number in the array (perhaps to find the
smallest number).
***To do so, you would need to read location 30H, then
31H, then 32H and so on.
This can be achieved using indirect addressing. R0 and
R1 may be used as pointer registers.
MOV A, @Ri (where Ri is either R0 or R1.)
Now, we can read the contents of location 30H through
indirect addressing:
MOV R0, #30H
MOV A, @R0
ANY Query regarding
this??
So now we know all addressing modes.
What is next now??
What is the difference between
Microprocessor and Microcontroller???
Microprocessors generally require external
components to implement program memory, ram
memory and Input/output.
-Here cpu is stand alone,RAM ROM I/O, timer are
separate.
-It is expensive n versatile.
-used for general purpose.
-RAM n ROM size is user defined.
-bit manipulation is less.
-access time is less.
-more hardware is used.
MICROCONTROLLER
 Microcontrollers incorporate program memory, ram
memory and input/output resources internal to the
chip.
-Here cpu RAM ROM I/O, timer are on a single chip.
-It is cheaper as compared to microprocessor.
-used for single purpose.
-fixed amount of on chip RAM,ROM and I/O ports.
-bit manipulation is more.
-access time is more.
-less hardware is used.
WHAT IS DIFFERENCE BETWEEN:
 8085
 8086
 8051
???
8051
 16 bit Microcontroller
 On chip ROM( 8KB) and On chip RAM (128 bytes)
 Two 16 bit timer/counter.
 Four 8-bit ports for input/output
 Fully duplex serial receiver/transmitter.
 No pre-fetching of instruction.
 16 address pins
8086
 16 bit Microprocessor
 No on chip memory.
 Memory is divided into two banks to increase
the processing speed.
 Pre-fetching of 6 bytes of instruction in a
queue.
 20 address pins
8085
 8 bit microprocessor
 16-bit address bus
 8-bit registers
 16-bit register pairs, BC, DE, and HL
 256 input/output (I/O) ports
 External Memory
REFERENCES
 https://www.silabs.com/Support%20Documents/Softw
are/8051_Instruction_Set.pdf
 http://coitweb.uncc.edu/~abw/ITCS3182F09/slides3.p
df
 http://www.cs.iit.edu/~virgil/cs470/Book/chapter4.pd
 http://www.slideshare.net/chappidi_saritha/addressin
g-modes-of-8051
 http://www.edsim51.com/8051Notes/8051/instruction
SetSummary.html
 http://www.nptel.iitm.ac.in/courses/Webcourse-
contents/IITKANPUR/microcontrollers/micro/ui/Cours
e_home2_6.htm
So now move to what is
instruction?
Types of instructions???

Contenu connexe

Tendances

Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer ArchitectureHaris456
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORRamaPrabha24
 
Difference b/w 8085 & 8086
Difference b/w 8085 & 8086Difference b/w 8085 & 8086
Difference b/w 8085 & 8086j4jiet
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modesRamaPrabha24
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Urvashi Singh
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086Dr. AISHWARYA N
 
Clock-8086 bus cycle
Clock-8086 bus cycleClock-8086 bus cycle
Clock-8086 bus cycleRani Rahul
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modesVijay Kumar
 
Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unitrishi ram khanal
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stackAsif Iqbal
 

Tendances (20)

Instruction code
Instruction codeInstruction code
Instruction code
 
Addressing modes ppt
Addressing modes pptAddressing modes ppt
Addressing modes ppt
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer Architecture
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
 
Difference b/w 8085 & 8086
Difference b/w 8085 & 8086Difference b/w 8085 & 8086
Difference b/w 8085 & 8086
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Clock-8086 bus cycle
Clock-8086 bus cycleClock-8086 bus cycle
Clock-8086 bus cycle
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
 
Subroutine
SubroutineSubroutine
Subroutine
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory mapping
Memory mappingMemory mapping
Memory mapping
 
Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unit
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 

En vedette

11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes Sher Shah Merkhel
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modessb108ec
 
Addressing mode of 8051
Addressing mode of 8051Addressing mode of 8051
Addressing mode of 8051Nitin Ahire
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051SARITHA REDDY
 
Addressing modes of 8051
Addressing modes  of 8051Addressing modes  of 8051
Addressing modes of 8051Bharath Reddy
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modesj4jiet
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086techbed
 
Addressing Modes Of 8086
Addressing Modes Of 8086Addressing Modes Of 8086
Addressing Modes Of 8086Ikhlas Rahman
 
8051 addressing modes
 8051 addressing modes 8051 addressing modes
8051 addressing modesghoshshweta
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructionsihsanjamil
 
Addressing modes
Addressing modesAddressing modes
Addressing modesAJAL A J
 
Addressing modes
Addressing modesAddressing modes
Addressing modesAsif Iqbal
 
Three complementary approaches to boost enterprise knowledge work development
Three complementary approaches to boost enterprise knowledge work developmentThree complementary approaches to boost enterprise knowledge work development
Three complementary approaches to boost enterprise knowledge work developmentAntti Martikainen
 

En vedette (20)

ADDRESSING MODE
ADDRESSING MODEADDRESSING MODE
ADDRESSING MODE
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modes
 
Addressing mode of 8051
Addressing mode of 8051Addressing mode of 8051
Addressing mode of 8051
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Addressing modes of 8051
Addressing modes  of 8051Addressing modes  of 8051
Addressing modes of 8051
 
8086 addressing modes
8086 addressing modes8086 addressing modes
8086 addressing modes
 
1327 Addressing Modes Of 8086
1327 Addressing Modes Of 80861327 Addressing Modes Of 8086
1327 Addressing Modes Of 8086
 
Addressing Modes Of 8086
Addressing Modes Of 8086Addressing Modes Of 8086
Addressing Modes Of 8086
 
8051 Addressing modes
8051 Addressing modes8051 Addressing modes
8051 Addressing modes
 
8051 addressing modes
 8051 addressing modes 8051 addressing modes
8051 addressing modes
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
8051 addressing
8051 addressing8051 addressing
8051 addressing
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Three complementary approaches to boost enterprise knowledge work development
Three complementary approaches to boost enterprise knowledge work developmentThree complementary approaches to boost enterprise knowledge work development
Three complementary approaches to boost enterprise knowledge work development
 

Similaire à 8051 ADDRESSING MODES (CONT.) explained

8051 instruction set
8051 instruction set8051 instruction set
8051 instruction setStefan Oprea
 
microprocessor and microcontroller notes ppt
microprocessor and microcontroller notes pptmicroprocessor and microcontroller notes ppt
microprocessor and microcontroller notes pptmananjain543
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modesbalbirvirdi
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csaAnjaan Gajendra
 
Micro controller(pratheesh)
Micro controller(pratheesh)Micro controller(pratheesh)
Micro controller(pratheesh)Pratheesh Pala
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085ShivamSood22
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
8051 Programming (1).pptx
8051 Programming (1).pptx8051 Programming (1).pptx
8051 Programming (1).pptxDhyeayaParmar
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085Mani Afranzio
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]shibbirtanvin
 
4bit PC report
4bit PC report4bit PC report
4bit PC reporttanvin
 

Similaire à 8051 ADDRESSING MODES (CONT.) explained (20)

module-3.pptx
module-3.pptxmodule-3.pptx
module-3.pptx
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
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
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modes
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csa
 
Micro controller(pratheesh)
Micro controller(pratheesh)Micro controller(pratheesh)
Micro controller(pratheesh)
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 Programming (1).pptx
8051 Programming (1).pptx8051 Programming (1).pptx
8051 Programming (1).pptx
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
8051d
8051d8051d
8051d
 
Pdemodule 4
Pdemodule 4Pdemodule 4
Pdemodule 4
 
Microcontroller .pptx
Microcontroller .pptxMicrocontroller .pptx
Microcontroller .pptx
 
viva q&a for mp lab
viva q&a for mp labviva q&a for mp lab
viva q&a for mp lab
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085
 
12 mt06ped008
12 mt06ped008 12 mt06ped008
12 mt06ped008
 
MPMC UNIT-2.pdf
MPMC UNIT-2.pdfMPMC UNIT-2.pdf
MPMC UNIT-2.pdf
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 
4bit PC report
4bit PC report4bit PC report
4bit PC report
 

Plus de Mayank Garg

Real time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemReal time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemMayank Garg
 
Max flow min cut
Max flow min cutMax flow min cut
Max flow min cutMayank Garg
 
Habits for computer
Habits for computerHabits for computer
Habits for computerMayank Garg
 
Wireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwavesWireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwavesMayank Garg
 
Presentation on green IT
Presentation on green ITPresentation on green IT
Presentation on green ITMayank Garg
 
Image attendance system
Image attendance systemImage attendance system
Image attendance systemMayank Garg
 
Cell phone operated land rover
Cell phone operated land roverCell phone operated land rover
Cell phone operated land roverMayank Garg
 
Broadband networking through human body
Broadband networking through human bodyBroadband networking through human body
Broadband networking through human bodyMayank Garg
 

Plus de Mayank Garg (20)

Windows CE
Windows CEWindows CE
Windows CE
 
Real time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemReal time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor system
 
Max flow min cut
Max flow min cutMax flow min cut
Max flow min cut
 
3 g successor
3 g successor3 g successor
3 g successor
 
Habits for computer
Habits for computerHabits for computer
Habits for computer
 
Wireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwavesWireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwaves
 
Radar
RadarRadar
Radar
 
Presentation on green IT
Presentation on green ITPresentation on green IT
Presentation on green IT
 
DTH System
DTH SystemDTH System
DTH System
 
Image attendance system
Image attendance systemImage attendance system
Image attendance system
 
Electronic nose
Electronic noseElectronic nose
Electronic nose
 
Cell phone operated land rover
Cell phone operated land roverCell phone operated land rover
Cell phone operated land rover
 
Oracle Database
Oracle DatabaseOracle Database
Oracle Database
 
Broadband networking through human body
Broadband networking through human bodyBroadband networking through human body
Broadband networking through human body
 
Mems paper
Mems paperMems paper
Mems paper
 
Stegnography
StegnographyStegnography
Stegnography
 
8051 memory
8051 memory8051 memory
8051 memory
 
Cybercrime
CybercrimeCybercrime
Cybercrime
 
Brain gate
Brain gateBrain gate
Brain gate
 
Database
DatabaseDatabase
Database
 

Dernier

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 

Dernier (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 

8051 ADDRESSING MODES (CONT.) explained

  • 1. 8051 ADDRESSING MODES (CONT.) By: Mayank Garg 2013H140040H
  • 2. “What is an addressing mode ?“
  • 3. “What is an addressing mode ?“ Addressing mode is the way of addressing a memory location in instruction. Microcntroller needs data or operands on which the operation is to be performed. The method of specifying source of operand and output of result in an instruction is known as addressing mode.
  • 4. “What is an addressing mode ?“ Addressing mode is the way of addressing a memory location in instruction. Microcntroller needs data or operands on which the operation is to be performed. The method of specifying source of operand and output of result in an instruction is known as addressing mode. Now question arises: How many types of addressing modes?
  • 5. ADDRESSING MODES The 8051 instructions use eight addressing modes. These are: 1. Register 2. Direct 3. Indirect 4. Immediate 5. Relative 6. Absolute 7. Indexed 8. Long
  • 6. ABSOLUTE ADDRESSING MODE  There are only two instructions that use this addressing:  ACALL (absolute call)  AJMP (absolute jump).  These instructions perform branching within the current 2K page of program memory.  The branch address is obtained by successively concatenating the five high-order bits of the program counter, bits 5 – 7 of the op-code,and the second byte of the instruction.
  • 7. CONTD…  The operation of the AJMP instruction is detailed below:  AJMP address (PC) <- (PC) + 2 (PC10-PC0) <- address10 - address0  The eleven least significant bits of the PC are altered. The five most significant bits remain the same. This means the AJMP will only allow you to jump to a location in the same 2K page as the instruction directly after the jump.
  • 8. For example: If the label THERE represents an instruction at address 0F46H and the instruction AJMP THERE is in memory at locations 0900H and 0901H, the assembler will encode the instruction as 11100001 1st byte (A10 - A8 + opcode) 01000110 2nd byte (A7 - A0) The underlined bits are the low-order 11 bits of the destination address, 0F46H = 0000111101000110B. The upper five bits in the program counter will not change when this instruction executes. Note that both the AJMP instruction and the destination are within the 2K page bounded by 0800H and 0FFFH, and therefore have the upper five address bits in common.
  • 10. RELATIVE ADDRESING  Relative addressing is used only with certain jump instructions. The system executes a jump by changing the contents of the PC to the address of the next instruction to be executed.  For example, if we wished to jump to the instruction stored at location 4EH in code memory, the PC would be loaded with 4EH. Then, during the next execution cycle the contents of the PC (4EH) are placed on the address bus and the instruction at 4EH is retrieved.
  • 11. SJUMP is an unconditional jump and is a 2-byte instruction. The number following it is an offset address. If this instruction were stored in code memory at locations 100H and 101H, as shown below: 100H 80H 101H 06H ---The PC contains 100H, therefore the instruction 80H is read into the IR. ---The instruction is decoded as the 2-byte SJMP instruction. ---The PC is incremented so that the operand may be retrieved. ---The operand is read from code memory and the PC is incremented again (because this is a 2-bye instruction). ---The operand (06H) is added to the PC (102H + 06H = 108H).
  • 13. INDEXED ADDRESSING MODE  In this mode the 16-bit address in a base register is added to a positive offset to form an effective address for the jump indirect instruction  JMP @A+DPTR  the two move code byte instructions  MOVC A,@A+DPTR and  MOVC A,@A+PC.  The base register in the jump instruction is the data pointer and the positive offset is held in the accumulator.  For the move instructions the base register can either be the data pointer or the program counter, and again the positive offset is in the accumulator.
  • 14. Example: JMP @A+DPTR (PC)  (A) +(DPTR) MOVC A,@A+DPTR (A)  ((A) + (DPTR)) MOVC A,@A+PC (PC)  (PC) + 1 (A)  ((A) + (PC))
  • 16. LONG ADDRESSING MODE  Only two instructions use this addressing mode.  These instructions are:  LCALL addr16  LJMP addr16.  Both of these are three byte instructions with the op- code being the first byte and the following two bytes are the address high-byte and address low-byte respectively.  These instructions enable the program to branch to anywhere within the full 64 K-bytes of program memory address space
  • 18. INDIRECT ADDRESSING MODE  In this mode of addressing the instruction performs an operation on the data whose address is contained in register R0 or R1. Instructions using indirect addressing are single byte instructions.  In 8051 assembly language the symbol @ before R0 or  SUBB A, @R0 R1 (denotes indirect addressing.)
  • 19. This instruction performs the operation: (A) (A) (C)  ((R0)). For example, ***if you had an array of 8-bit numbers stored in memory, starting at address 30H, you may wish to examine the contents of each number in the array (perhaps to find the smallest number). ***To do so, you would need to read location 30H, then 31H, then 32H and so on.
  • 20. This can be achieved using indirect addressing. R0 and R1 may be used as pointer registers. MOV A, @Ri (where Ri is either R0 or R1.) Now, we can read the contents of location 30H through indirect addressing: MOV R0, #30H MOV A, @R0
  • 21. ANY Query regarding this?? So now we know all addressing modes. What is next now??
  • 22. What is the difference between Microprocessor and Microcontroller???
  • 23. Microprocessors generally require external components to implement program memory, ram memory and Input/output. -Here cpu is stand alone,RAM ROM I/O, timer are separate. -It is expensive n versatile. -used for general purpose. -RAM n ROM size is user defined. -bit manipulation is less. -access time is less. -more hardware is used.
  • 24. MICROCONTROLLER  Microcontrollers incorporate program memory, ram memory and input/output resources internal to the chip. -Here cpu RAM ROM I/O, timer are on a single chip. -It is cheaper as compared to microprocessor. -used for single purpose. -fixed amount of on chip RAM,ROM and I/O ports. -bit manipulation is more. -access time is more. -less hardware is used.
  • 25. WHAT IS DIFFERENCE BETWEEN:  8085  8086  8051 ???
  • 26. 8051  16 bit Microcontroller  On chip ROM( 8KB) and On chip RAM (128 bytes)  Two 16 bit timer/counter.  Four 8-bit ports for input/output  Fully duplex serial receiver/transmitter.  No pre-fetching of instruction.  16 address pins
  • 27. 8086  16 bit Microprocessor  No on chip memory.  Memory is divided into two banks to increase the processing speed.  Pre-fetching of 6 bytes of instruction in a queue.  20 address pins
  • 28. 8085  8 bit microprocessor  16-bit address bus  8-bit registers  16-bit register pairs, BC, DE, and HL  256 input/output (I/O) ports  External Memory
  • 29. REFERENCES  https://www.silabs.com/Support%20Documents/Softw are/8051_Instruction_Set.pdf  http://coitweb.uncc.edu/~abw/ITCS3182F09/slides3.p df  http://www.cs.iit.edu/~virgil/cs470/Book/chapter4.pd  http://www.slideshare.net/chappidi_saritha/addressin g-modes-of-8051  http://www.edsim51.com/8051Notes/8051/instruction SetSummary.html  http://www.nptel.iitm.ac.in/courses/Webcourse- contents/IITKANPUR/microcontrollers/micro/ui/Cours e_home2_6.htm
  • 30.
  • 31. So now move to what is instruction? Types of instructions???