In 8051 There are six types of addressing modes.
 Register AddressingMode
 Direct AddressingMode
 Register IndirectAddressing Mode
 Immediate AddressingMode
 Implied/Register Specfic AddressingMode
 Indexed AddressingMode
 The register addressing instruction involves
information transfer between registers
 The 8051 can access eight ‘’working registers’’(R0-
R7).
 Three bit code within the instruction selects one of
the eight registers from the selected register bank.
 The programmer can select a register bank by
modifying bits 4 and 3 in the PSW.
 Example: add the content of register r3 and r4 from
bank 2.
 step 1: MOV PSW
 step 2:MOV A, R3
MOV A, R4
 Can access any on chip variable and hardware
register.(RAM and SF register).
 This mode allows you to specify the operand by
giving its actual memory address.
 the MSB of the address decides whether it is a
location within in the chip RAM(MSB=0) or in
SFR.(MSB=1).
 Example: MOV A,50H
ADD A, 51H
 addressing mode R0 and R1 of each register bank
can be used as an index or pointer register.
 R0 and R1 point to the contents in the RAM.
 the instruction with indirect addressing uses the@
sign.
 Example: MOV A , @R0
ADD A ,@R1
 In this Immediate Addressing Mode, the data is
provided in the instruction itself.
 The data is provided immediately after the opcode.
 The sign # indicates it is a immediate addressing
mode.
 Example: MOV A ,#52
 Inherent in the instruction, these refers to a specific
register such as accumulator or DPTR.
 In the implied addressing mode, there will be a
single operand.
 These types of instruction can work on specific
registers only.
 Example: RLA , SWAPA
 These are 1- byte instruction. The first one is used
to rotate the A register content to the Left. The
second one is used to swap the nibbles in A.
 Only program memory can be accessed in the
index addressing.
 Either DPTR or PC can be used as an index.
 Example: MOVCA, @A+PC;
MOVCA, @A+DPTR;
The C in MOVC instruction refers to code byte. For
the first instruction, let us consider A holds 30H. And
the PC value is1125H. The contents of program
memory location 1155H (30H + 1125H) are moved to
register A.
 Comparison b/w MC and MP
 Features of 8051
 Architecture
 Pin configuration
 Memory organization(external data and program)
 Addressing modes
 8051 microcontrollers are manufactured by which of the following
companies?
a) Atmel
b) Philips
c) Intel
d) All of the mentioned
 Unlike microprocessors, microcontrollers make use of batteries
because they have:
a) high power dissipation
b) low power consumption
c) low voltage consumption
d) low current consumption
 The internal RAM memory of the 8051 is:
A. 32 bytes
B. 64 bytes
C. 128 bytes
D. 256 bytes
 The 8051 has ________ 16-bit counter/timers.
A. 1 B. 2 C. 3 D. 4
 Microcontrollers often have:
A. CPUs
B. RAM
C. ROM
D. all of the above
Microcontroller .pptx

Microcontroller .pptx

  • 2.
    In 8051 Thereare six types of addressing modes.  Register AddressingMode  Direct AddressingMode  Register IndirectAddressing Mode  Immediate AddressingMode  Implied/Register Specfic AddressingMode  Indexed AddressingMode
  • 3.
     The registeraddressing instruction involves information transfer between registers  The 8051 can access eight ‘’working registers’’(R0- R7).  Three bit code within the instruction selects one of the eight registers from the selected register bank.  The programmer can select a register bank by modifying bits 4 and 3 in the PSW.
  • 4.
     Example: addthe content of register r3 and r4 from bank 2.  step 1: MOV PSW  step 2:MOV A, R3 MOV A, R4
  • 5.
     Can accessany on chip variable and hardware register.(RAM and SF register).  This mode allows you to specify the operand by giving its actual memory address.  the MSB of the address decides whether it is a location within in the chip RAM(MSB=0) or in SFR.(MSB=1).  Example: MOV A,50H ADD A, 51H
  • 6.
     addressing modeR0 and R1 of each register bank can be used as an index or pointer register.  R0 and R1 point to the contents in the RAM.  the instruction with indirect addressing uses the@ sign.  Example: MOV A , @R0 ADD A ,@R1
  • 7.
     In thisImmediate Addressing Mode, the data is provided in the instruction itself.  The data is provided immediately after the opcode.  The sign # indicates it is a immediate addressing mode.  Example: MOV A ,#52
  • 8.
     Inherent inthe instruction, these refers to a specific register such as accumulator or DPTR.  In the implied addressing mode, there will be a single operand.  These types of instruction can work on specific registers only.  Example: RLA , SWAPA  These are 1- byte instruction. The first one is used to rotate the A register content to the Left. The second one is used to swap the nibbles in A.
  • 9.
     Only programmemory can be accessed in the index addressing.  Either DPTR or PC can be used as an index.  Example: MOVCA, @A+PC; MOVCA, @A+DPTR; The C in MOVC instruction refers to code byte. For the first instruction, let us consider A holds 30H. And the PC value is1125H. The contents of program memory location 1155H (30H + 1125H) are moved to register A.
  • 10.
     Comparison b/wMC and MP  Features of 8051  Architecture  Pin configuration  Memory organization(external data and program)  Addressing modes
  • 11.
     8051 microcontrollersare manufactured by which of the following companies? a) Atmel b) Philips c) Intel d) All of the mentioned  Unlike microprocessors, microcontrollers make use of batteries because they have: a) high power dissipation b) low power consumption c) low voltage consumption d) low current consumption  The internal RAM memory of the 8051 is: A. 32 bytes B. 64 bytes C. 128 bytes D. 256 bytes
  • 12.
     The 8051has ________ 16-bit counter/timers. A. 1 B. 2 C. 3 D. 4  Microcontrollers often have: A. CPUs B. RAM C. ROM D. all of the above