GENERAL PURPOSE RAM FOR MICROCONTROLLER

Posted on at


GENERAL PURPOSE RAM FOR MICROCONTROLLER

  • M/c uses separate spaces for data and code.
  • Internal memory of m/c consists of on chip code memory and data memory which is “RAM”.
  • On chip RAM consist of general purpose registers, bit addressable locations and special purpose registers.
  • General purpose RAM starts from 30 H and ends at 7FH.
  • Any location of RAM can be addressed freely using direct or indirect addressing modes.
  • For example to read the contents of location 5FH into accumulator we use instruction

                       MOV A, 5FH

  • This is direct addressing and instruction will copy all the contents of location 5FH into accumulator.
  • RAM can also be assessed by indirect addressing mode for example

 

              MOV R0, #5FH

             MOV A,@R0

  • First instruction is immediate addressing and will load value 5FH in register R0.
  • Second instruction represents indirect addressing mode and will copy data contents pointes by register R0.


About the author

saimazahoor

this is me,the cutest and the most charming saima zahoor

Subscribe 2468
160