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

Microcontroladores 8051

4. Types of instructions in the microcontroller 8051

The instruction set of microcontroller 8051 can be divided into the following groups:

  • Data transfer instructions.
  • Arithmetic instructions.
  • Logical Instructions (Boolean).
  • Program Control Instructions (jumps).
  • Bit manipulation instructions.

View Reference Guide 8051 microcontrollers .

4.1. Data Transfer Instructions

Data Transfer Instructions microcontroller 8051.

Perform data movement between registers, memory and ports.

MOV destination, source. Data movement in the internal RAM. This type of instructions supported by virtually all addresses, direct, indirect, recording and immediate.

MOV A,P0 ; Mueve el contenido del puerto 0 al acumulador
MOV R1,A ; Mueve el contenido del Acumulador al registro 1

MOVX. Data movement in the external RAM (XRAM). This type of motion only supports indirect addressing, register 8bit by R0 or R1 and 16-bit register via the DPTR.

MOV DPTR,#2000H ; Mover al registro apuntador DPTR el dato inmediato 2000H (dirección)
MOVX A,@DPTR ; Mover el contenido de la memoria que apunta el DPTR (2000H) al Acumulador

MOVC. Allows movement of the accumulator ROM. By this statement can make the manipulation or movement of tables from the program memory.

XCH. Swaps the contents of the accumulator and the internal RAM.

XCHD. Swaps the contents of the first 4 bits of the Accumulator with internal RAM.

PUSH and POP. To transfer data to the stack.

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