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

Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formatsMazin Alwaaly
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer ArchitectureHaris456
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stackAsif Iqbal
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modesVijay Kumar
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperationsNitesh Singh
 
Timing and control
Timing and controlTiming and control
Timing and controlchauhankapil
 
Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed controlShashank Singh
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-busAnuj Modi
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 

Tendances (20)

Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Addressing sequencing
Addressing sequencingAddressing sequencing
Addressing sequencing
 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formats
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer Architecture
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Interrupts and types of interrupts
Interrupts and types of interruptsInterrupts and types of interrupts
Interrupts and types of interrupts
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
8085 addressing modes
8085 addressing modes8085 addressing modes
8085 addressing modes
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
Timing and control
Timing and controlTiming and control
Timing and control
 
Computer registers
Computer registersComputer registers
Computer registers
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-bus
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 

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
 
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
 
Comparative study of 8085,86,286
Comparative study of 8085,86,286Comparative study of 8085,86,286
Comparative study of 8085,86,286Pravin Kulkarni
 

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 format
Instruction formatInstruction format
Instruction format
 
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
 
Comparative study of 8085,86,286
Comparative study of 8085,86,286Comparative study of 8085,86,286
Comparative study of 8085,86,286
 

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

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 

Dernier (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 

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???