User: alciro    User
 Original    Translate to:  Deutsch  English  Français  中文  
 

Microcontroladores 8051

2. Memory structure in the 8051 microcontrollers

2.2. Internal data memory

8051 microcontrollers have a very limited internal memory, a total of 256 positions for the data, employment records and special records. In the 8052 microcontroller family has been expanded through the addition of 128 new positions between memory locations 80H to FFH that overlap with the current. To access a group or the other must be done by addressing, in this way, the main memory is accessed by direct addressing and high school through indirect or covert. Based on the addressing modes of the microcontroller, there are three memory areas:

  • Area direct and indirect addressing.
  • Single address space directly.
  • Single indirect address space (in 8052).
Data memory of microcontroller 8051/8052

Access to the memory by direct addressing.

To access the memory area of direct addressing uses the address to which you want to access. For example, to place the value at the port P0 05H (80H).

MOV 80H,#05H ; Poner el dato inmediato (constante) 05H en la posición 80H

Access to the memory by indirection.

To access the memory area of indirection is to use the internal register R0 or R1.
For example, to put 4 positions, from 90H to 93H memory to 0.

MOV R0,#90H ; Mover la dirección a la que se desea acceder al registro R0
MOV @R0,#00H ; Mover de forma indirecta, mediante el contenido de R0 el dato inmediato 0
INC R0 ; Incrementar el registro R0 apuntador (91H)
MOV @R0,#00H ; Mover un 00H a la dirección apuntada
INC R0 ; Incrementar el registro R0 apuntador (92H)
MOV @R0,#00H ; Mover un 00H a la dirección apuntada
INC R0 ; Incrementar el registro R0 apuntador (93H)
MOV @R0,#00H ; Mover un 00H a la dirección apuntada

Loading
copyright © 2007-2021  www.alciro.org  All rights reserved.         
Share |