📄 timer_user.ppl
字号:
243 : #define TM00_OneshotOut 0
244 : #define TM00_PulseMeasurement 1
245 : /* if no use some method of pulse measurement set method = 1 */
246 : #define TM00_Pulse_TI00nAndTI01nFreeRunning 1
247 : #define TM00_Pulse_TI00nFreeRunning 0
248 : #define TM00_Pulse_TI00nRestart 0
249 :
250 : /* macro for setting of different functions */
251 :
252 : /*
253 : ***************************************
254 : ** TM00 pulse measurement
255 : **
256 : ** user set mode=
257 : ***************************************
258 : */
259 :
260 : /* Count clock */
261 : /* Use register bit macro
262 : TM0n_PRM0n_CountClock_Internal0 : fprs or
263 : TM0n_PRM0n_CountClock_Internal1 : fprs/2^2 or
264 : TM0n_PRM0n_CountClock_Internal2 : fprs/2^8 or
265 : Note : Please select the higher frequency you can,
266 : so the precision will be higher.
267 : */
268 : #define TM00_Clock TM0n_PRM0n_CountClock_Internal0
269 :
270 :
/*
78K/0 Series C Compiler V3.60 Preprocess List Date: 9 Oct 2005 Page: 6
*/
271 : /* Register settings */
272 : #define TM00_TMC0nValue TM0n_TMC0n_Operation_FreeRunning
273 : #define TM00_PRM0nValue TM0n_PRM0n_TI01nEdge_Both|
: TM0n_PRM0n_TI00nEdge_Both| TM00_Clock /* internal count cl
: ock only */
274 : #define TM00_CRC0nValue TM0n_CRC0n_CR01nMode_Capture|
: TM0n_CRC0n_CR00nMode_Capture
275 :
276 : /* Interrupt settings */
277 : #define TM00_INTTM000 1
278 : #define TM00_INTTM010 1
279 :
280 :
281 :
282 : /*
283 : ***************************************
284 : ** TM01 configure
285 : **
286 : ** Please set operation mode here
287 : ***************************************
288 : */
289 : /* if no use set nouse = 1, if use some function set function = 1 */
290 : #define TM01_NotUse 0
291 : #define TM01_Interval 0
292 : #define TM01_ExternalEvent 0
293 : #define TM01_SquareOut 0
294 : #define TM01_PPGOut 0
295 : #define TM01_OneshotOut 0
296 : #define TM01_PulseMeasurement 1
297 : /* if no use some method of pulse measurement set method = 1 */
298 : #define TM01_Pulse_TI00nAndTI01nFreeRunning 0
299 : #define TM01_Pulse_TI00nFreeRunning 1
300 : #define TM01_Pulse_TI00nRestart 0
301 :
302 : /* macro for setting of different functions */
303 :
304 : /*
305 : ***************************************
306 : ** TM01 pulse measurement
307 : **
308 : ** user set mode =
309 : ***************************************
310 : */
311 :
312 : /* Count clock */
313 : /* Use register bit macro
314 : TM0n_PRM0n_CountClock_Internal0 : fprs or
315 : TM0n_PRM0n_CountClock_Internal1 : fprs/2^4 or
316 : TM0n_PRM0n_CountClock_Internal2 : fprs/2^6 or
317 : Note : Please select the higher frequency you can,
318 : so the precision will be higher.
319 : */
320 : #define TM01_Clock TM0n_PRM0n_CountClock_Internal0
321 :
322 :
323 : /* Register settings */
/*
78K/0 Series C Compiler V3.60 Preprocess List Date: 9 Oct 2005 Page: 7
*/
324 : #define TM01_TMC0nValue TM0n_TMC0n_Operation_FreeRunning
325 : #define TM01_PRM0nValue TM0n_PRM0n_TI01nEdge_Rising|
: TM0n_PRM0n_TI00nEdge_Rising| TM01_Clock /* internal
: count clock only */
326 : #define TM01_CRC0nValue TM0n_CRC0n_CR01nMode_Capture|
: TM0n_CRC0n_CR00nTrigger_TI00nEdgeReverse| TM0n_CRC0n_CR00nMode
: _Capture
327 :
328 : /* Interrupt settings */
329 : #define TM01_INTTM001 0
330 : #define TM01_INTTM011 1
331 :
332 :
333 :
334 : /*
335 : ***************************************
336 : ** TM50 configure
337 : **
338 : ** Please set operation mode here
339 : ***************************************
340 : */
341 : /* if no use set nouse = 1, if use some function set function = 1 */
342 : #define TM50_NotUse 1
343 : #define TM50_Interval 0
344 : #define TM50_ExternalEvent 0
345 : #define TM50_SquareOut 0
346 : #define TM50_PWMOut 0
347 :
348 :
349 : /* Interrupt settings */
350 : #define TM50_INTTM50 0
351 :
352 :
353 : /*
354 : ***************************************
355 : ** TM51 configure
356 : **
357 : ** Please set operation mode here
358 : ***************************************
359 : */
360 : /* if no use set nouse = 1, if use some function set function = 1 */
361 : #define TM51_NotUse 1
362 : #define TM51_Interval 0
363 : #define TM51_ExternalEvent 0
364 : #define TM51_SquareOut 0
365 : #define TM51_PWMOut 0
366 :
367 :
368 : /* Interrupt settings */
369 : #define TM51_INTTM51 0
370 :
371 :
372 : /*
373 : ***************************************
374 : ** TMH0 configure
375 : **
/*
78K/0 Series C Compiler V3.60 Preprocess List Date: 9 Oct 2005 Page: 8
*/
376 : ** Please set operation mode here
377 : ***************************************
378 : */
379 : /* if no use set nouse = 1, if use some function set function = 1 */
380 : #define TMH0_NotUse 1
381 : #define TMH0_Interval 0
382 : #define TMH0_SquareOut 0
383 : #define TMH0_PWMOut 0
384 :
385 :
386 : /* Interrupt settings */
387 : #define TMH0_INTTMH0 0
388 :
389 :
390 : /*
391 : ***************************************
392 : ** TMH1 configure
393 : **
394 : ** Please set operation mode here
395 : ***************************************
396 : */
397 : /* if no use set nouse = 1, if use some function set function = 1 */
398 : #define TMH1_NotUse 1
399 : #define TMH1_Interval 0
400 : #define TMH1_SquareOut 0
401 : #define TMH1_PWMOut 0
402 : #define TMH1_CarrierOut 0
403 :
404 :
405 : /* Interrupt settings */
406 : #define TMH1_INTTMH1 0
407 :
408 :
409 :
410 :
411 :
412 :
413 : #pragma interrupt INTTM000 HD_INTTM000
414 :
415 :
416 : #pragma interrupt INTTM010 HD_INTTM010
417 :
418 :
419 :
420 :
421 :
422 :
423 : #pragma interrupt INTTM011 HD_INTTM011
424 :
425 :
426 :
427 :
428 :
429 :
430 :
431 :
/*
78K/0 Series C Compiler V3.60 Preprocess List Date: 9 Oct 2005 Page: 9
*/
432 :
433 :
434 :
435 : /*
436 : *******************************************************************************
437 : ** Include files
438 : *******************************************************************************
439 : */
440 :
441 :
442 : /*
443 : *******************************************************************************
444 : **
445 : ** This device driver was created by Applilet for the 78K0/KB2, 78K0/KC2,
446 : ** 78K0/KD2, 78K0/KE2 and 78K0/KF2 8-Bit Single-Chip Microcontrollers.
447 : **
448 : ** Filename : timer.h
449 : ** Abstract : This file implements a device driver for the timer module
450 : ** Device : uPD78F0547
451 : ** Compiler: NEC/CC78K0
452 : **
453 : *******************************************************************************
454 : */
455 :
456 :
457 : /*
458 : *******************************************************************************
459 : **
460 : ** This device driver was created by Applilet for the 78K0/KB2, 78K0/KC2,
461 : ** 78K0/KD2, 78K0/KE2 and 78K0/KF2 8-Bit Single-Chip Microcontrollers.
462 : **
463 : ** Filename : timer_config.h
464 : ** Abstract : This file implements a device driver for the timer module
465 : ** Device : uPD78F0547
466 : ** Compiler: NEC/CC78K0
467 : **
468 : *******************************************************************************
469 : */
470 :
471 : /*
472 : *******************************************************************************
473 : ** Case : Square wave output function
474 : **
475 : ** Description : Output squarewave
476 : **
477 : ** Setting : fprs = 8MHz
478 : ** TM00 TM00_Pulse_TI00nAndTI01nFreeRunnin
479 : ** TM01 TM00_Pulse_TI00nFreeRunning
480 : ** TM50
481 : ** TM51
482 : ** TMH0
483 : ** TMH1
484 : **
485 : *******************************************************************************
486 : */
487 :
/*
78K/0 Series C Compiler V3.60 Preprocess List Date: 9 Oct 2005 Page: 10
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -