
ML610471/472/473/Q471/Q472/Q473 User's Manual
Chapter 9 Timer
9-13
9.3.2 16-bit timer frequency measurement mode operation
The frequency measurement mode in 16-bit timer 2&3, is used to count the frequency of 500kHz RC oscillation clock
which typically has temperature variation and production tolerance.
Using the frequency measurement mode can make better accuracy for uart baud-rate clock or timer function.
(1) Reading the count data, calculating and setting it to uart communication baud-rate registers, can make more accurate
baud-rate clock.
(2) Reading the count data, calculating and setting it to a timer data register, can make more accurate timing in normal
timer mode.
Figure 9-3 shows the operation timing in frequency measurement mode.
Figure 9-3 Operation Timing in frequency measurement mode
(1) High-speed clock (HSCLK, HTBCLK) has to be in oscillating state by controlling with FCONn registers. And also
select 1/1 divide ratio of the high-speed time base counter by setting HTBDR (High-speed Time Base counter Divide
Register) register to 0FH.
(2) Reset both T2RUN bit (bit0 of TM2CON1 register) and T3RUN bit (bit0 of TM3CON1 register) to “0” to stop the
timer. And then, check both T2STAT bit (bit7 of TM2CON1 register) and T3STAT bit (bit7 of TM3CON1 register) are
“0” for making certain the timer stops.
(3) Set T23MFM bit (bit3 of TM2CON0 register) to “1” (Frequency measurement mode), set T23M16 bit (bit2 of
TM2CON0 register) to “1” (16bit mode) and set T2CS1-0 bits(bit1/0 of TM2CON0 register) to “01”(HTBCLK mode).
(4) Set “FFH” to both TM2D register and TM3D register.
(5) Clear both TM2C register and TM3C register to “00H”.
(6) Set T2RUN bit (bit0 of TM2CON1 register) to “1” to start counting the timer.
(H)
FFFF
N1
0000
T23MFM
T23M16
T2RUN
T2STAT
TM3INT
437C
64Hz
(3)
(5)
(6)
(7)
(8)
437/32768S
{
TM3C,TM2C}
Содержание ML610471
Страница 12: ...Chapter 1 Overview...
Страница 38: ...Chapter 2 CPU and Memory Space...
Страница 44: ...Chapter 3 Reset Function...
Страница 48: ...Chapter 4 MCU Control Function...
Страница 62: ...Chapter 5 Interrupts...
Страница 82: ...Chapter 6 Clock Generation Circuit...
Страница 94: ...Chapter 7 Time Base Counter...
Страница 105: ...Chapter 8 Capture...
Страница 114: ...Chapter 9 Timer...
Страница 133: ...Chapter 10 Watchdog Timer...
Страница 141: ...Chapter 11 UART...
Страница 164: ...Chapter 12 Port 0...
Страница 173: ...Chapter 13 Port 2...
Страница 180: ...Chapter 14 Port 3...
Страница 188: ...Chapter 15 Port 4...
Страница 199: ...Chapter 16 Port 6...
Страница 205: ...Chapter 17 RC Oscillation Type A D Converter...
Страница 225: ...Chapter 18 LCD Drivers...
Страница 243: ...Chapter 19 Power Supply Circuit...
Страница 245: ...Chapter 20 uEASE Flash Writer System...
Страница 249: ...Chapter 21 Software Development...
Страница 258: ...Appendixes...
Страница 280: ...Revision History...