Upload
vj-aiswaryadevi
View
3.339
Download
5
Tags:
Embed Size (px)
DESCRIPTION
iie
Citation preview
8051 REGISTERS
On-Chip MemoryInternal RAM
Registers
0706050403020100
R7R6R5R4R3R2R1R0
0F
08
17
10
1F
18
Bank 3
Bank 2
Bank 1
Bank 0
Four Register BanksEach bank has R0-R7Selectable by psw.2,3
Bit Addressable Memory
20h – 2Fh (16 locations X 8-bits = 128 bits)
7F 78
1A
10
0F 08
07 06 05 04 03 02 01 00
27
26
25
24
23
22
21
20
2F
2E
2D
2C
2B
2A
29
28
Special Function Registers
DATA registers
CONTROL registersTimersSerial portsInterrupt systemAnalog to Digital converterDigital to Analog converterEtc.
Addresses 80h – FFhDirect Addressing used to access SFRs
A (Accumulator)BPSW (Program Status Word)SP (Stack Pointer)PC (Program Counter)DPTR (Data Pointer)
8051 CPU Registers
Used in assembler instructions
A
B
R0
R1
R3
R4
R2
R5
R7
R6
DPH DPL
PC
DPTR
PC
Some 8051 16-bit Register
Some 8-bit Registers of the
8051
PROGRAM STATUS WORD
IE: Interrupt Enable Register(bit addressable)
• If the bit is 0, the corresponding interrupt is disabled. Otherwise, the interrupt is enabled.
IP: Interrupt Priority Register(bit addressable)
• If the bit is 0, the corresponding interrupt has a lower priority and if the bit is 1, the interrupt has a higher priority
TCON: Timer/Counter Control Register (bit addressable)
TMOD: Timer/Counter Mode Control Register (not bit addressable)
PCON – Power Control Register
Address: 87H (not bit addressable) SMOD – Serial mode bit used to determine the baud rate with Timer 1. GF1 and GF0 are General purpose flags not implemented on the standard device PD is the power down bit. Not implemented on the standard device IDL activate the idle mode to save power. Not implemented on the standard device