宏晶科技:www.MCU-Memory.com
Mobile:13922805190(姚永平)
Tel:0755-82948409
Fax: 0755-82944243
看 狗 用
适用型号:
STC89C51RC,STC89C52RC,STC89C53RC,STC89LE51RC,STC89LE52RC,STC89LE53RC
STC89C54RD+,STC89C58RD+,STC89C516RD+,STC89LE54RD+,STC89LE58RD+,STC89LE516RD+
宏晶技 支持, 直接向宏晶采 晶片,而不要通 中 商,支持我 更好地服
RC/RD+系列 8051 片机 看 狗定 器 特殊功能寄存器 Watch Dog Timer SFR
Mnemonic Add
Name
7
6
5
4
3
2
1
0 Reset Value
Watch-Dog-Timer
Control register
WDT_CONTR E1h
-
- EN_WDT CLR_WDT IDLE_WDT PS2 PS1 PS0 xx00,0000
Symbol符号 Function功能
EN_WDT
Enable WDT bit. When set, WDT is started
看 狗允 位, 当 置 “1” ,看 狗启 。
WDT clear bit. When set, WDT will recount. Hardware will automatically clear
this bit.
CLR_WDT
看 狗清“0”位, 当
“1” ,看 狗将重新 数。硬件将自 清“0”此位。
IDLE_WDT
When set, WDT is enabled in IDLE mode. When clear, WDT is disabled in IDLE mode
看 狗“IDLE”模式位,当 置 “1” ,看 狗定 器在“空 模式” 数
当清“0” 位 , 看 狗定 器在“空 模式” 不 数
PS2, PS1, PS0 Pre-scale value of Watchdog timer is shown as the bellowed table:
看 狗定 器 分 ,如下表所示
Pre-scale
分
WDT Period @20MHz
and 12 clocks mode
PS2
PS1
PS0
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
2
39.3 mS
78.6 mS
157.3 mS
314.6 mS
629.1 mS
1.25S
4
8
16
32
64
128
256
2.5S
5S
The WDT period is determined by the following equation 看 狗溢出
看 狗溢出 = (N x Pre-scale x 32768) / Oscillator frequency
N = 12, 当在12 clock mode , N = 6, 当在6 clock mode
12MHz, 12 模式
看 狗溢出 = (12 x Pre-scale x 32768) / 12000000 = Pre-scale x 393216 / 12000000
算
Pre-scale
分
WDT Period @12MHz
and 12 clocks mode
PS2
PS1
PS0
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
2
65.5 mS
131.0 mS
262.1 mS
524.2 mS
1.0485S
2.0971S
4.1943S
8.3886S
4
8
16
32
64
128
256
宏晶科技:
片机/存 器供 商
www.MCU-Memory.com
STC 增 型8051 片机中文指南(RC/RD+系列)
16