Different types of addressing modes in 8051.

By


Different types of addressing modes in 8051.




Addressing:-The CPU can access data in a register or in memory or be provided as an immediate value. These various ways of accessing data are called addressing modes.
      The 8051 provides a total of five distinct addressing modes.
      They are as follows:-
1) Immediate addressing modes.
     
2) Register addressing modes.
      
3) Direct addressing modes.
    
  4) Register indirect - addressing mode.
  5) Indexed addressing mode.


Let us study different modes with selective examples:-
1) Immediate Addressing mode:-
                                    In This addressing mode, the source operated is a constant i.e. immediate data. Note that the immediate data must be preceded by the pound sign"#".
       Example:-
                MOV A, # 82H                        ; load 82H into A
                MOV R4, # 100                       ; load the decimal value 100 in to R4
                MOV B, # 40H                        ; load 40H in to B
               MOV P1, # 55H                        ; load 55H directly to port 1
               MOV DPTR , # 4521 H            ; DPTR =4521 H

          2) Register - Addressing Mode:-                                              
                                 Register addressing mode involves the use of registers to hold data to be manipulated.
      Example:-
              MOV  A,RO                              ;copy the contents of R0 in to A
              MOV R2,A                                ;copy the contents of A in to R2
              ADD A,R5                                 ;Add contents of R5 to A
              MOV  R7,DPL                           ;load R7 with contents of DPL

            3) Direct Addressing mode:-
                               In direct addressing mode the data is in a RAM Memory location whose addressing is known and this address is given as a part of the instruction.
                               Although the entire 128 bytes of RAM com be addressed Using direct addressing mode
                               It is most often used to access RAM locations 30-7FH
     Example:-

              MOV R0, 40H                        ; save content of RAM location 40H in Ro
              MOV 7FH, A                          ; save content of A in to RAM location 7FH
              MOV A,07H                          ;same as move A1 R7 is copies data in R7 to A
              MOV 03H, 04H                        ; it copies data in R4 to R3

        4) Indirect addressing mode:-
                               In the register indirect addressing mode a register is used as a pointer to the data .only register R0 and R1 are used for internal RAM indirect Data transfer.
                          When they hold the address of Rom locations they must be preceded by  the “@” symbol.
            Example :-

         MOV ,A, @R0              ;move contents of Ram location whose address is help
                                                By R0 in to A
        MOV @ R1 ,B               ;move contents of B in to RAM location whose Address is    
                                                help by R1.

      5) Indexed addressing mode :-
                        Indexed addressing mode is widely used in accessing data elements of look-up table entries located  in the program Rom space of the 8051.

            Example :-

MOV A, @ A + DPTR
MOV A, @ A+ PC



Tags: addressing modes 8051 microcontroller pdfaddressing modes 8051 microcontroller pptaddressing modes 8051 pptaddressing modes 8051 pdfaddressing modes of 8051 wikipediaaddressing modes of 8051 microcontroller wikiaddressing modes of 8051 microcontroller with examples pdfabsolute addressing mode 8051addressing modes 8051 microcontrolleraddressing modes 8051 microcontroller pdfaddressing modes 8051 microcontroller pptaddressing modes 8051 pptaddressing modes 8051 pdfaddressing modes of 8051 wikipediaaddressing modes of 8051 microcontroller wikiaddressing modes of 8051 microcontroller with examples pdfabsolute addressing mode 8051indirect addressing mode 80518051 addressing modes and instruction set8051 architecture addressing modesaddressing modes supported by 8051addressing modes of 8051 microcontrollerdifferent addressing modes of 8051direct addressing modes of 8051addressing modes of 8051 examplesaddressing modes of 8051 microcontroller with examples pdfaddressing modes for 8051 microcontrolleraddressing modes in 8051addressing modes in 8051 microcontroller pdfaddressing modes in 8051 microcontroller pptaddressing modes in 8051 pptaddressing modes in 8051 pdfrelative addressing modes in 8051indirect addressing mode in 8051absolute addressing mode in 8051long addressing mode in 8051implied addressing mode in 8051list addressing modes of 8051addressing modes 8051 microcontrolleraddressing modes 8051 microcontroller pdfaddressing modes 8051 microcontroller pptaddressing modes of 8051 microcontroller wikiaddressing modes of 8051 microcontroller with examples pdfaddressing modes and instruction set of 8051 microcontrollerdifferent types of addressing modes in 8051 microcontrollerlist different addressing modes of microcontroller 8051addressing modes of 8051addressing modes of 8051 microcontroller pdfaddressing modes of 8051 microcontroller pptaddressing modes of 8051 pptaddressing modes of 8051 pdfaddressing modes of 8051 wikipediaaddressing modes of 8051 microcontroller wikiaddressing modes of 8051 microcontroller with examples pdfaddressing modes 8051 pptaddressing modes 8051 pdfaddressing mode pada 8051addressing modes 8051 microcontroller pdfaddressing modes 8051 microcontroller pptaddressing modes of 8051 microcontroller with examples pdfrelative addressing modes in 8051addressing modes supported by 80518051 addressing modes tutorialtypes addressing modes 8051various addressing modes of 8051addressing modes of 8051 with examplesaddressing modes of 8051 wikipediaaddressing modes of 8051 microcontroller wiki8051 addressing modes wikiaddressing modes of 8051 microcontroller with examples pdfaddressing modes 0f 80515 addressing modes of 80515 addressing modes of 8051chapter 5 8051 addressing modes

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Thank you for posting detailed and well describe information about 8051 can you please describe what is difference between raspberry pi and 8051 ic
      JTAG

      Delete

If you have any questions or droughts feel free to ask here.