ML63611 User’s Manual
Chapter 7 Timers (TIMER)
7 – 18
OPTION B (D): 1.5 V (3.0 V), With regulator
circuit for LCD bias
OPTION A (C): 1.5 V (3.0 V), Without regulator
circuit for LCD bias
7.4.6 Capture Mode Operation
Timer 0 and timer 1 can be used as capture mode timers.
In a capture mode, a change in the capture input (PB.0/TM0CAP, PB.1/TM1CAP) level during operation of the
timer counter register triggers loading of the value of the timer counter register into the timer data register.
Methods to set the capture mode for each timer are listed below.
•
Timer 0: Set TM0ECAP (bit 1 of TM0CON0) to “1”, and set FMEAS0 (bit 2 of TM0CON0) to “0”.
•
Timer 1: Set TM1ECAP (bit 1 of TM1CON0) to “1”.
In the capture mode, reloading the timer data register data into the timer counter register is inhibited, and when the
timer counter register overflows, counting is restarted from 00H.
When a capture occurs, the capture flags (TM0CAP, TM1CAP) of the timer status registers (TM0STAT,
TM1STAT) are set to “1”. Additional captures are disabled while the capture flags are “1”. The capture flags are
assigned to bit 0 of the timer status registers, and are automatically cleared to “0” when the timer status registers
are read.
If both the TM1CL1 and TM1CL0 bits of the timer 1 control register 1 (TM1CON1) are set to “1” and timer 0
overflow is selected as the clock, the 16-bit capture mode will be set. In this case, the PB.0/TM0CAP pin is the
capture trigger input.
Figure 7-8 shows the timer 0 capture mode timing for pulse width measurement.
Figure 7-8 Capture Mode Timing
TM0CH, TM0CL
TM0DH, TM0DL
TM0RUN
TM0ECAP
TM0INT
PB.0/TM0CAP input
TM0CAP
XI0INT
50H
F0H
60H
E0H
←
➆
➁
↓
➅
➇
→
←
➈
00H
50H
F0H
60H
E0H
t3
t2
t1
➀
➃
→
➂
←
➄
Содержание ML63611
Страница 9: ...Chapter 1 Overview...
Страница 33: ...Chapter 2 CPU and Memory Spaces...
Страница 42: ...Chapter 3 CPU Control Functions...
Страница 49: ...Chapter 4 Interrupt INT...
Страница 62: ...Chapter 5 Clock Generator Circuit OSC...
Страница 71: ...Chapter 6 Time Base Counter TBC...
Страница 75: ...Chapter 7 Timers TIMER...
Страница 99: ...Chapter 8 100 Hz Timer Counter 100HzTC...
Страница 103: ...Chapter 9 Watchdog Timer WDT...
Страница 108: ...Chapter 10 Ports INPUT I O PORT...
Страница 140: ...Chapter 11 Melody Driver MELODY...
Страница 152: ...Chapter 12 Serial Port SIO...
Страница 179: ...Chapter 13 LCD Driver LCD...
Страница 200: ...Chapter 14 Battery Low Detect Circuit BLD...
Страница 204: ...Chapter 15 Power Supply Circuit POWER...
Страница 215: ...Chapter 16 A D Converter ADC...
Страница 238: ...Appendixes...
Страница 271: ...ML63611 User s Manual First Edition May 2001 Second Edition June 2001 2001 Oki Electric Industry Co Ltd PEUL63611 02...