Addressing Modes | Types of Addressing Modes | Addressing Modes in Microcontroller 8051

Wednesday, October 17, 2012 , ,

Addressing mode is the way of addressing a memory location in instruction. Microcontroller 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.
There are various methods of giving source and destination address in instruction, thus there are various types of Addressing Modes. Here you will find the different types of Addressing Modes that are supported in Micro Controller 8051. Types of Addressing Modes are explained below:
Also Read: Introduction to Microcontroller 8051

Types Of Addressing Modes: 

Following are the types of Addressing Modes:
  • Register Addressing Mode
  • Direct Addressing Mode
  • Register Indirect Addressing Mode
  • Immediate Addressing Mode
  • Index Addressing Mode
  1. Register Addressing Mode: In this addressing mode, the source of data or destination of result is Register. In this type of addressing mode the name of the register is given in the instruction where the data to be read or result is to be stored.
    Example: ADD A, R5 ( The instruction will do the addition of data in Accumulator with data in register R5)
  2. Direct Addressing Mode: In this type of Addressing Mode, the address of data to be read is directly given in the instruction. In case, for storing result the address given in instruction is used to store the result.
    Example: MOV A, 46H ( This instruction will move the contents of memory location 46H to Accumulator)
  3. Register Indirect Addressing Mode: In Register Indirect Addressing Mode, as its name suggests the data is read or stored in register indirectly. That is, we provide the register in the instruction, in which the address of the other register is stored or which points to other register where data is stored or to be stored.
    Example: MOV A, @R0 ( This instruction will move the data to accumulator from the register whose address is stored in register R0 ).
    Also Read: Architecture Of 8051
  4. Immediate Addressing Mode : In Immediate Addressing Mode , the data immediately follows the instruction. This means that data to be used is already given in the instruction itself.
    Example: MOV A, #25H ( This instruction will move the data 25H to Accumulator. The # sign shows that preceding term is data, not the address.)
  5. Index Addressing Mode: Offset is added to the base index register to form the effective address if the memory location.This Addressing Mode  is used for reading lookup tables in Program Memory. The Address of the exact location of the table is formed by adding the Accumulator Data to the base pointer.
    Example: MOVC, @A+DPTR ( This instruction will move the data from the memory to Accumulator; the address is made by adding the contents of Accumulator and Data Pointer.