English
Language : 

PD17012_15 Datasheet, PDF (198/320 Pages) Renesas Technology Corp – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DIGITAL TUNING SYSTEM HARDWARE
µPD17012, 17P012
17. FREQUENCY COUNTER
17.1 Outline of Frequency Counter
Figure 17-1 illustrates the frequency counter.
The frequency counter has an IF counter function to count the intermediate frequency (IF) of an external input signal
and an external gate counter (FCG: Frequency Counter for external Gate signal) to detect the pulse width of an external
input signal.
The IF counter function counts the frequency input to the P1B3/FMIFC or P1B2/AMIFC pin at fixed intervals (1 ms,
4 ms, 8 ms, or open) by using a 16-bit counter.
The external gate counter function counts the frequency of the internal clock (1 kHz, 100 kHz, 900 kHz) from the
rising to the falling of the signal input to the P0B3/FCG1 or P0B2/FCG0 pin.
The IF counter and external gate counter functions cannot be used at the same time.
Figure 17-1. Outline of Frequency Counter
P0B3/FCG1
P0B2/FCG0
P1B3/FMIFC
P1B2/AMIFC
FCGCH1 flag
FCGCH0 flag
I/O select
block
IFCMD1 flag
IFCMD0 flag
IFCCK1 flag
IFCCK0 falg
IFCSTRT flag
Gate time
control block
Start/stop
control block
IFCG flag
DBF
IF counter
(16 bits)
IFCRES flag
Remarks 1.
2.
3.
4.
5.
6.
FCGCH1 and FCGCH0 (bits 1 and 0 of the FCG channel select register; refer to Figure 17-4) select
the pin used for the external gate counter function.
IFCMD1 and IFCMD0 (bits 3 and 2 of the IF counter mode select register; refer to Figure 17-3) select
the IF counter or external gate counter function.
IFCCK1 and IFCCK0 (bits 1 and 0 of the IF counter mode select register; refer to Figure 17-3) select
the gate time of the IF counter function and the reference frequency of the external gate counter
function.
IFCSTRT (bit 1 of the IF counter control register; refer to Figure 17-6) control starting of the IF
counter and external gate counter functions.
IFCG (bit 0 of the IF counter gate judge register; refer to Figure 17-7) detects opening/closing the
gate of the IF counter function.
IFCRES (bit 0 of the IF counter control register; refer to Figure 17-6) reset the count value of the
IF counter.
196
Data Sheet U10101EJ4V0DS