📄 adc.lst
字号:
157 1 /// -----------------------------------------------------------------------
158 1 /// Conv service request node configuration:
159 1 /// - Conv interrupt priority level (ILVL) = 14
160 1 /// - Conv interrupt group level (GLVL) = 0
161 1 /// - Conv group priority extension (GPX) = 0
162 1
163 1 ADC_CIC = 0x0078;
164 1
165 1 /// Use PEC channel 0 for ADC Conv INT:
166 1 /// - decrement counter
167 1 /// - increment destination pointer
168 1 /// - transfer a word
169 1 /// - service End of PEC interrrupt by a EOP interrupt node is disabled
170 1
171 1 PECC0 = 0x0202; // load PECC0 control register
172 1
173 1 SRCP0 = _sof_(&ADC_DAT); //set source pointer
174 1
175 1 //// - DO NOT FORGET TO SET THE DESTINATION-POINTER FOR PECC CHANNEL 0
176 1 //// BECAUSE IT IS SELECTED FOR USER DEFINED
177 1
178 1 /// Error service request node configuration:
179 1 /// - Error interrupt priority level (ILVL) = 11
C166 COMPILER V4.27, ADC 12/19/2003 11:51:10 PAGE 4
180 1 /// - Error interrupt group level (GLVL) = 1
181 1 /// - Error group priority extension (GPX) = 0
182 1
183 1 ADC_EIC = 0x006D;
184 1
185 1 /// Use PEC channel 5 for ADC Error INT:
186 1 /// - decrement counter
187 1 /// - increment destination pointer
188 1 /// - transfer a word
189 1 /// - service End of PEC interrrupt by a EOP interrupt node is disabled
190 1
191 1 PECC5 = 0x2202; // load PECC5 control register
192 1
193 1 SRCP5 = _sof_(&ADC_DAT2); //set source pointer
194 1
195 1 //// - DO NOT FORGET TO SET THE DESTINATION-POINTER FOR PECC CHANNEL 5
196 1 //// BECAUSE IT IS SELECTED FOR USER DEFINED
197 1
198 1
199 1 /// -----------------------------------------------------------------------
200 1 /// Configuration of the used ADC Port Pins:
201 1 /// -----------------------------------------------------------------------
202 1
203 1
204 1 P5DIDIS = 0x0000; // load Port 5 digital input disable register
205 1
206 1
207 1
208 1 // USER CODE BEGIN (Init,3)
209 1 DSTP0=_sof_(&adc_result[0]);
210 1 DSTP5=_sof_(&adc_dclink_res[0]);
211 1 // USER CODE END
212 1
213 1 } // End of function ADC_vInit
214
215
216 //****************************************************************************
217 // @Function void ADC_viConv(void)
218 //
219 //----------------------------------------------------------------------------
220 // @Description This is the interrupt service routine for the ADC. It is
221 // called at the end of each conversion. The user obtains the
222 // conversion result by calling the function ADC_uwReadConv().
223 // Please note that you have to add application specific code
224 // to this function.
225 //
226 //----------------------------------------------------------------------------
227 // @Returnvalue None
228 //
229 //----------------------------------------------------------------------------
230 // @Parameters None
231 //
232 //----------------------------------------------------------------------------
233 // @Date 19.12.2003
234 //
235 //****************************************************************************
236
237 // USER CODE BEGIN (Conv,1)
238
239 // USER CODE END
240
241 void ADC_viConv(void) interrupt ADC_C_INT
C166 COMPILER V4.27, ADC 12/19/2003 11:51:10 PAGE 5
242 {
243 1 // USER CODE BEGIN (Conv,2)
244 1
245 1
246 1 // adcresult=ADC_uwReadConv();
247 1
248 1 // USER CODE END
249 1
250 1 } // End of function ADC_viConv
251
252
253 //****************************************************************************
254 // @Function void ADC_viError(void)
255 //
256 //----------------------------------------------------------------------------
257 // @Description This is the interrupt service routine for the overwrite
258 // error of the ADC (in standard mode) - the last measurement
259 // result was overwritten - , or the ISR for the end of an
260 // injected conversion - the result of the injected conversion
261 // has been written to ADC_DAT2. An overrun is not possible in
262 // channel injection mode; in this case the A/D measurement is
263 // stopped. To get the injected conversion result the user can
264 // call the function ADC_uwReadInject().
265 // Please note that you have to add application specific code
266 // to this function.
267 //
268 //----------------------------------------------------------------------------
269 // @Returnvalue None
270 //
271 //----------------------------------------------------------------------------
272 // @Parameters None
273 //
274 //----------------------------------------------------------------------------
275 // @Date 19.12.2003
276 //
277 //****************************************************************************
278
279 // USER CODE BEGIN (Error,1)
280
281 // USER CODE END
282
283 void ADC_viError(void) interrupt ADC_E_INT
284 {
285 1 // USER CODE BEGIN (Error,2)
286 1
287 1 // USER CODE END
288 1
289 1 } // End of function ADC_viError
290
291
292
293
294 // USER CODE BEGIN (ADC_General,10)
295
296 // USER CODE END
297
MODULE INFORMATION: INITIALIZED UNINITIALIZED
CODE SIZE = 106 --------
NEAR-CONST SIZE = -------- --------
FAR-CONST SIZE = -------- --------
C166 COMPILER V4.27, ADC 12/19/2003 11:51:10 PAGE 6
HUGE-CONST SIZE = -------- --------
XHUGE-CONST SIZE = -------- --------
NEAR-DATA SIZE = -------- --------
FAR-DATA SIZE = -------- --------
XHUGE-DATA SIZE = -------- --------
IDATA-DATA SIZE = 2 --------
SDATA-DATA SIZE = -------- --------
BDATA-DATA SIZE = -------- --------
HUGE-DATA SIZE = -------- --------
BIT SIZE = -------- --------
INIT'L SIZE = -------- --------
END OF MODULE INFORMATION.
C166 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -