📄 dog_at.lst
字号:
C51 COMPILER V6.10 DOG_AT 04/18/2001 13:37:08 PAGE 1
C51 COMPILER V6.10, COMPILATION OF MODULE DOG_AT
OBJECT MODULE PLACED IN .\DOG_AT.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE .\DOG_AT.C OPTIMIZE(6,SPEED) BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /*------------------------------------------------------------------*-
2
3 Dog_AT.C (v1.00)
4
5 ------------------------------------------------------------------
6
7 Demonstration of watchdog timer facilities on Atmel 89S53.
8
9 [Compiles and runs but does nothing useful]
10
11 ==============================================================
12
13 *** PORTABILITY NOTE ***
14
15 If porting this code to a different chip, then
16 take care when using 'idle mode'. With *some* devices,
17 use of idle mode stops the internal watchdog timer; this
18 may not be what you require.
19
20 In particular, please note that the scheduler code introduced
21 in Chapter 13 (and used throughout much of this book) makes
22 use of idle mode. If using a watchdog timer with one of the
23 schedulers, you need to check the data sheet for your chosen
24 microcontroller and - if necessary - make the minor changes
25 necessary to the file Sch51.c to prevent the scheduler
26 using idle mode.
27
28 (In the AT89S53, use of idle mode does NOT stop the watchdog)
29
30 ==============================================================
31
32 COPYRIGHT
33 ---------
34
35 This code is from the book:
36
37 PATTERNS FOR TIME-TRIGGERED EMBEDDED SYSTEMS by Michael J. Pont
38 [Pearson Education, 2001; ISBN: 0-201-33138-1].
39
40 This code is copyright (c) 2001 by Michael J. Pont.
41
42 See book for copyright details and other information.
43
44 -*------------------------------------------------------------------*/
45
46 #include "Dog_AT.h"
47
48 /*------------------------------------------------------------------*/
49 void WATCHDOG_Init(void)
50 {
51 1 // Set 512 ms watchdog
52 1 // PS2 = 1; PS1 = 0; PS0 = 1
53 1 // Set WDTRST = 1
54 1 // Set WDTEN = 1 - start the Watchdog
55 1 //
C51 COMPILER V6.10 DOG_AT 04/18/2001 13:37:08 PAGE 2
56 1 // WMCON |= 10100011
57 1 WMCON |= 0xA3;
58 1 }
59
60 /*------------------------------------------------------------------*-
61 ---- END OF FILE -------------------------------------------------
62 -*------------------------------------------------------------------*/
63
64
65
66
67
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 4 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -