📄 timer.lst
字号:
C51 COMPILER V7.07 TIMER 11/25/2005 20:21:58 PAGE 1
C51 COMPILER V7.07, COMPILATION OF MODULE TIMER
OBJECT MODULE PLACED IN timer.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE timer.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /*
2 * Copyright(c)2005 - 2009 danise .China
3 * All rights reserved.
4 * Redistribution and use in source and bianry forms
5 * with or without modification ,are permitted provided
6 * that following conditions are met:
7 *
8 * 1.Redistrubution of source code must retain the
9 * above copyright notice,this list of conditions and
10 * following disclaimer.
11 *
12 * 2.Redistributions in binary form must reproduce the
13 * above copyright notice,this list of conditions and
14 * following disclaimer in the documentation and /or other
15 * materials provided with the distribution.
16 *
17 * Alternately, this acknowledgment may appear in the software
18 * itself,if and wherever such third-party acknowledgements
19 * normally appear.
20 *
21 * This software is designed for key board and led display.
22 *
23
24 */
25 #include "./include/datatypes.h"
26 #include "./include/keyboard.h"
27 #include "./include/timer.h"
28 UINT8 clock0 = 0;
29 UINT8 elapsetime = 0;
30 UINT16 sreensaveclk = 0;
31 /*
32 Timer0 interrupt server request
33 */
34 void Timer0ISR(void) interrupt 1
35 {
36 1 UINT8 keyVal = 0;
37 1 CPL932_TL0 = 0x6b;
38 1 CPL932_TH0 = 0x71; /*osc 7.3M , 10 ms */
39 1 keyVal = GetSafeKeyValue();
40 1 AnalyseKeyVal( keyVal );
41 1
42 1 }
43 /*
44 Timer1 interrupt server request
45 */
46 void Timer1ISR(void) interrupt 3
47 {
48 1 EA = 0;
49 1 CPL932_TL1 = 0x1;
50 1 CPL932_TH1 = 0x0; /*osc 12M , 10 ms */
51 1
52 1 if (sreensaveclk < 65530)
53 1 sreensaveclk++;
54 1 else
55 1 sreensaveclk=65530;
C51 COMPILER V7.07 TIMER 11/25/2005 20:21:58 PAGE 2
56 1
57 1 if(elapsetime<253)
58 1 elapsetime++;
59 1 else
60 1 elapsetime=254;
61 1
62 1 if(clock0>0)
63 1 clock0--;
64 1
65 1 EA=1;
66 1
67 1
68 1 }
69 void wait( UINT8 n ) /* n < 255 */
70 {
71 1 clock0 = n;
72 1 while(clock0){};
73 1 }
74
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 201 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 4 ----
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 + -