C8051T620/1/6/7 & C8051T320/1/2/3
28.2.3. Low-Frequency Oscillator (LFO) Capture Mode
The Low-Frequency Oscillator Capture Mode allows the LFO clock to be measured against the system
clock or an external oscillator source. Timer 2 can be clocked from the system clock, the system clock
divided by 12, or the external oscillator divided by 8, depending on the T2ML (CKCON.4), and T2XCLK
settings.
Setting TF2CEN to 1 enables the LFO Capture Mode for Timer 2. In this mode, T2SPLIT should be set to
0, as the full 16-bit timer is used. Upon a falling edge of the low-frequency oscillator, the contents of Timer
2 (TMR2H:TMR2L) are loaded into the Timer 2 reload registers (TMR2RLH:TMR2RLL) and the TF2H flag
is set. By recording the difference between two successive timer capture values, the LFO clock frequency
can be determined with respect to the Timer 2 clock. The Timer 2 clock should be much faster than the
LFO to achieve an accurate reading.
T2XCLK
SYSCLK / 12
0
External Clock / 8
1
SYSCLK
Low-Frequency
Oscillator
Figure 28.6. Timer 2 Low-Frequency Oscillation Capture Mode Block Diagram
258
CKCON
T
T
T
T
T
T
S
S
3
3
2
2
1
0
C
C
M
M
M
M
M
M
A
A
H
L
H
L
1
0
0
TR2
Capture
1
TF2CEN
Rev. 1.2
TCLK
TMR2L
TMR2H
TMR2RLL TMR2RLH
TF2H
Interrupt
TF2L
TF2LEN
TF2CEN
T2SPLIT
TR2
T2XCLK
Need help?
Do you have a question about the C8051T620 and is the answer not in the manual?
Questions and answers