
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}
Summary of Contents for ML610471
Page 12: ...Chapter 1 Overview...
Page 38: ...Chapter 2 CPU and Memory Space...
Page 44: ...Chapter 3 Reset Function...
Page 48: ...Chapter 4 MCU Control Function...
Page 62: ...Chapter 5 Interrupts...
Page 82: ...Chapter 6 Clock Generation Circuit...
Page 94: ...Chapter 7 Time Base Counter...
Page 105: ...Chapter 8 Capture...
Page 114: ...Chapter 9 Timer...
Page 133: ...Chapter 10 Watchdog Timer...
Page 141: ...Chapter 11 UART...
Page 164: ...Chapter 12 Port 0...
Page 173: ...Chapter 13 Port 2...
Page 180: ...Chapter 14 Port 3...
Page 188: ...Chapter 15 Port 4...
Page 199: ...Chapter 16 Port 6...
Page 205: ...Chapter 17 RC Oscillation Type A D Converter...
Page 225: ...Chapter 18 LCD Drivers...
Page 243: ...Chapter 19 Power Supply Circuit...
Page 245: ...Chapter 20 uEASE Flash Writer System...
Page 249: ...Chapter 21 Software Development...
Page 258: ...Appendixes...
Page 280: ...Revision History...