Tuesday, July 19, 2011

Registers in 8051: An intro to 8051 microController part -1

The first part for intro of micro controller 8051.



Registers in 8051
A
B
R0
R1
R2
R3
R4
R5
R6
R7
DPTR (DATA POINTER)
PC (PROGRAM COUNTER)


Operation on registers remains the same as in 8085.
like
MOV R0, 12H ;
MOV A, R0 ;
ADD A, R1 ;


etc etc.
MVI instruction used for loading data in registers in 8085 is performed
by MOV instruction in 8051.


MOV R0, #55H ;
MOV R1, #0FFH ;


point to note:
1) a value to be loaded in register must be preceded by a pound sign(#)
otherwise it means to load from a memory location  like


MOV R0, 12H ;


means move value stored at 12H to register R0.


2) in order to load an immediate value 55H into register we need to use
pound sign(#). where pound sign preceds a value  like


MOV R0, #55H ;


means move value 55H to register.

No comments:

Post a Comment