Datasheet
FS98O22
Rev. 1.6 61/146
z Frequency Measurement mode:
Programmable Counter could be used to measure a signal frequency.
Operation:
1. Set FQTMB and clear MUXSEL[2] register flags to make the Programmable Counter work as Frequency
Measurement.
2. Setup MUXSEL[1:0] to decide the input clock signal.
3. PFI is the signal which is ready to measure the frequency. Users could set TE to invert the PFI voltage
level.
4. Clear OVAB register flag to set the CTA as the working counter. When CTA counter overflows, the
interrupt (CTIE) will be triggered.
5. Clear CTIF and set the CTIE and GIE register flags to enable the Programmable Counter interrupt.
6. Setup CTB[15:0]. CTA[15:0] will be filled with the same value as CTB[15:0]. When CTA[15:0] overflows, it
will be filled with the same value again. User could decide CTA timeout by setting up CTB[15:0] register.
7. Set TON to start the Frequency Measurement.
8. When CTA counter overflows, the interrupt will be triggered. TON register flag will be clear automatically.
9. Users could read the CTB value to know the PFI signal frequency.
CLK
TON
CTA_CLK
CTA FFEA FFEC FFED FFEE FFEF FFF0 FFF1 FFF2
CTB XXXX
XXXX FFEB
INT
FFF3 FFF4 FFF5 FFF6 FFF7 FFF8 FFF9
X1
CTIF
FFFA FFFB FFFC FFFD FFFE FFFF 0000
Software Set
Software Write into CTB (CTA same as CTB)
CTB_CLK
PFII
FFEA FFEB FFEC FFED FFEE FFEF FFF0 FFF1 FFF2
FQTMB
When CTIE=1
Figure 6-6 Programmable Counter Frequency Measurement mode
FORTUNE'
Properties
For Reference Only