Xung & Hoi1
1.Giithiu
2.Sơđồ khivàchân
3.Tchcbnh
4.
4. C
Cá
ác
cthanh
thanh ghi
ghi ch
ch
c
cnăng
năng đ
đ
c
cbi
bi
t
t(SFR)
(SFR)
5.Dao độngvàhotđộngreset
6.Tplnh
7.cmode định địach
8.LptrìnhIO
9.Totr
10.LptrìnhTimer/Counter
11.Lptrìnhgiaotiếpnitiếp
12.Lptrìnhngt
13.Lptrìnhhpng
Xung & Hoi2
mthêmHình2.6 trang26
SFRs
Xung & Hoi3
CPU registers:
-ACC: Accumulator.
-B: B register.
-PSW: Program Status Word.
-SP: Stack Pointer.
-DPTR: Data Pointer (DPH, DPL).
Interrupt control:
-IE: Interrupt Enable.
-IP: Interrupt Priority.
I/O Ports:
-P0: Port 0.
-P1: Port 1.
-P2: Port 2.
-P3: Port 3.
Xung & Hoi4
TImers:
-TMOD: Timer mode.
-TCON: Timer control.
-TH0: Timer 0 high byte.
-TL0: Timer 0 low byte.
-TH1: Timer 1 high byte.
-TL1: Timer 1 low byte.
Serial I/O:
-SCON: Serial port control.
-SBUF: Serial data registers.
Other:
-PCON: Power control & misc.
Xung & Hoi5
4-1. ThanhghiPSW
ThanhghiPSW (bit addressable)
CAC F0 RS1 OVRS0 P--
RS1RS0Register BankByte Address of R0-R7
0 0000H-07H
0 1108H-0FH
1 0210H-17H
1 1318H-1FH
CPSW.7Cnh
ACPSW.6Cnhph
--PSW.5Available to user for general purpose
RS1PSW.4Bit chnythanhghi1
RS0PSW.3Bit chnythanhghi0
OVPSW.2Ctràn
--PSW.1Dtr-User define bit
PPSW.0Cchnl
Địachbit
D0D1D2D3D4D5D6D7