📄 t01.lst
字号:
C51 COMPILER V8.05a T01 07/13/2008 19:12:35 PAGE 1
C51 COMPILER V8.05a, COMPILATION OF MODULE T01
OBJECT MODULE PLACED IN T01.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE T01.C BROWSE DEBUG OBJECTEXTEND
line level source
1 //****************************************************************************
2 // @Module Timer 0/1
3 // @Filename T01.C
4 // @Project T01.dav
5 //----------------------------------------------------------------------------
6 // @Controller Infineon XC886CLM-8FF
7 //
8 // @Compiler Keil
9 //
10 // @Codegenerator 1.6
11 //
12 // @Description: This file contains functions that use the T01 module.
13 //
14 //----------------------------------------------------------------------------
15 // @Date 2008-7-13 19:11:57
16 //
17 //****************************************************************************
18
19 // USER CODE BEGIN (T01_General,1)
20
21 // USER CODE END
22
23
24
25 //****************************************************************************
26 // @Project Includes
27 //****************************************************************************
28
29 #include "MAIN.H"
30
31 // USER CODE BEGIN (T01_General,2)
32
33 // USER CODE END
34
35
36 //****************************************************************************
37 // @Macros
38 //****************************************************************************
39
40 // USER CODE BEGIN (T01_General,3)
41
42 // USER CODE END
43
44
45 //****************************************************************************
46 // @Defines
47 //****************************************************************************
48
49 // USER CODE BEGIN (T01_General,4)
50
51 // USER CODE END
52
53
54 //****************************************************************************
55 // @Typedefs
C51 COMPILER V8.05a T01 07/13/2008 19:12:35 PAGE 2
56 //****************************************************************************
57
58 // USER CODE BEGIN (T01_General,5)
59
60 // USER CODE END
61
62
63 //****************************************************************************
64 // @Imported Global Variables
65 //****************************************************************************
66
67 // USER CODE BEGIN (T01_General,6)
68
69 // USER CODE END
70
71
72 //****************************************************************************
73 // @Global Variables
74 //****************************************************************************
75
76 // USER CODE BEGIN (T01_General,7)
77
78 // USER CODE END
79
80
81 //****************************************************************************
82 // @External Prototypes
83 //****************************************************************************
84
85 // USER CODE BEGIN (T01_General,8)
86
87 // USER CODE END
88
89
90 //****************************************************************************
91 // @Prototypes Of Local Functions
92 //****************************************************************************
93
94 // USER CODE BEGIN (T01_General,9)
95
96 // USER CODE END
97
98
99 //****************************************************************************
100 // @Function void T01_vInit(void)
101 //
102 //----------------------------------------------------------------------------
103 // @Description This is the initialization function of the Timer 0/1
104 // function library. It is assumed that the SFRs used by this
105 // library are in their reset state.
106 //
107 // The following SFR fields will be initialized for both
108 // timers 0 and 1:
109 // T0M - Timer 0 mode
110 // T1M - Timer 1 mode
111 // GATE0/GATE1 - gating control
112 // TLx, THx - timer low/high registers
113 // ETx - interrupt enable
114 // TRx - timer run control (this is the final
115 // action)
116 //
117 //----------------------------------------------------------------------------
C51 COMPILER V8.05a T01 07/13/2008 19:12:35 PAGE 3
118 // @Returnvalue None
119 //
120 //----------------------------------------------------------------------------
121 // @Parameters None
122 //
123 //----------------------------------------------------------------------------
124 // @Date 2008-7-13
125 //
126 //****************************************************************************
127
128 // USER CODE BEGIN (T01_Init,1)
129
130 // USER CODE END
131
132 void T01_vInit(void)
133 {
134 1 // USER CODE BEGIN (T01_Init,2)
135 1
136 1 // USER CODE END
137 1
138 1 /// -----------------------------------------------------------------------
139 1 /// Timer 0
140 1 /// -----------------------------------------------------------------------
141 1 /// Mode 1: 16-bit timer (TH0, TL0)
142 1 /// the timer 0 overflow is 535.500
143 1
144 1
145 1 /// -----------------------------------------------------------------------
146 1 /// Timer 1
147 1 /// -----------------------------------------------------------------------
148 1 /// Mode 0: 8-bit timer (TH1) with a divide-by-32 prescaler (TL1)
149 1 /// the timer 1 overflow is 682.667
150 1
151 1
152 1 TMOD = 0x01;
153 1
154 1 TL0 = 0xE6;
155 1 TH0 = 0xE6;
156 1
157 1 TL1 = 0x00;
158 1 TH1 = 0x00;
159 1
160 1 /// Enable Timer 0 interrupt
161 1 ET0 = 1;
162 1
163 1 // USER CODE BEGIN (T01_Init,3)
164 1
165 1 // USER CODE END
166 1
167 1 /// Start Timer 0
168 1 TR0 = 1;
169 1 } // End of function T01_vInit
170
171
172 //****************************************************************************
173 // @Function void T01_viTmr0(void)
174 //
175 //----------------------------------------------------------------------------
176 // @Description This is the service routine for the timer 0 interrupt. It
177 // is called
178 // - when TH0 overflows if timer 0 is in mode 0 or 1
179 // - when TL0 overflows if timer 0 is in mode 2 or 3
C51 COMPILER V8.05a T01 07/13/2008 19:12:35 PAGE 4
180 // Please note that you have to add application specific code
181 // to this function.
182 //
183 //----------------------------------------------------------------------------
184 // @Returnvalue none
185 //
186 //----------------------------------------------------------------------------
187 // @Parameters None
188 //
189 //----------------------------------------------------------------------------
190 // @Date 2008-7-13
191 //
192 //****************************************************************************
193
194 // You have two choices for interrupt type select in Project Settings Page
195 // under Global Settings Section.
196 // If you select CHOICE 1 then ISR will be generated with push and pop.
197 // If you select CHOICE 2 then ISR will be generated without push and pop.
198 // Default choice is CHOICE 2.
199 // Current selection is CHOICE 2
200
201 // USER CODE BEGIN (T01_IsrTmr0,1)
202
203 // USER CODE END
204
205 void T01_viTmr0(void) interrupt T0INT
206 {
207 1
208 1 // USER CODE BEGIN (T01_IsrTmr0,2)
209 1
210 1 // USER CODE END
211 1
212 1 } // End of function T01_viTmr0
213
214
215 // USER CODE BEGIN (T01_General,10)
216
217 // USER CODE END
218
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 20 ----
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 + -