Hardware manual

Atmel 8051 Microcontrollers Hardware Manual 1
4316A–8051–01/04
Section 1
The C51 Instruction Set........................................................................1-1
1.1 Program Status Word................................................................................1-1
1.2 Addressing Modes ....................................................................................1-2
1.2.1 Direct Addressing ..............................................................................1-2
1.2.2 Indirect Addressing............................................................................1-2
1.2.3 Register Instructions...........................................................................1-2
1.2.4 Register-specific Instructions..............................................................1-2
1.2.5 Immediate Constants..........................................................................1-3
1.2.6 Indexed Addressing...........................................................................1-3
1.3 Arithmetic Instructions...............................................................................1-4
1.4 Logical Instructions ...................................................................................1-5
1.5 Data Transfers .........................................................................................1-6
1.5.1 Internal RAM......................................................................................1-6
1.6 External RAM...........................................................................................1-9
1.7 Lookup Tables .........................................................................................1-9
1.8 Boolean Instructions ...............................................................................1-10
1.8.1 Relative Offset ..................................................................................1-11
1.9 Jump Instructions....................................................................................1-11
1.10 Instruction Table .....................................................................................1-13
Section 2
Common Features Description ...........................................................2-16
2.1 Introduction ............................................................................................2-16
2.2 Special Function Registers .....................................................................2-17
2.2.1 Accumulator......................................................................................2-18
2.2.2 B Register.........................................................................................2-18
2.2.3 Program Status Word.......................................................................2-18
2.2.4 Stack Pointer ....................................................................................2-19
2.2.5 Data Pointer......................................................................................2-19
2.2.6 Ports 0 to 3 .......................................................................................2-19
2.2.7 Serial Data Buffer .............................................................................2-19
2.2.8 Timer Registers ................................................................................2-19
2.2.9 Capture Registers.............................................................................2-19
2.2.10 Control Registers.............................................................................2-20
2.3 Oscillator and Clock Circuit.....................................................................2-20
2.3.1 More about the On-chip Oscillator....................................................2-20
2.4 CPU Timing.............................................................................................2-21
2.4.1 X1 Mode (Standard Mode) ...............................................................2-21
2.4.2 X2 Mode ...........................................................................................2-22