199
CHAPTER 14 FREQUENCY COUNTER
User’s Manual U15104EJ2V0UD
14.4 Operation of Frequency Counter
<1> Select an input pin, mode, and gate time using the IF counter mode select register (IFCMD).
Figure 14-5 shows a block diagram of input pin and mode selection.
<2> Set bit 0 (IFCRES) of the IF counter control register (IFCCR) to 1, and clear the data of the IF counter register.
<3> Set bit 1 (IFCST) of the IF counter control register (IFCCR) to 1.
<4> The gate is opened only for the set gate time since a 1 kHz internal signal has risen after IFCST was set.
If the gate time is set to be opened, the gate is opened as soon as it has been specified to be opened.
Bit 0 (IFCJG0) of the IF counter gate judge register (IFCJG) is automatically set to 1 as soon as IFCST has
been set to 1.
When the gate time has elapsed, bit 0 (IFCJG0) of the IF counter gate judge register (IFCJG) is automatically
cleared to 0. If it is specified that the gate be open, however, IFCJG0 is not automatically cleared. In this
case, set a gate time. Figure 14-6 shows the gate timing of the frequency counter.
<5> While the gate opens the frequency input to the selected FMIFC or AMIFC pin, the IF counter register counts
the frequency.
If the FMIFC pin is used in the FMIF count mode, however, the input frequency is divided by half before it
is counted.
The relationship between the count value x (decimal), the input frequencies (f
FMIFC
and f
AMIFC
), and the gate time
(T
GATE
) is shown below.
•
FMIF count mode (FMIFC pin)
f
FMIFC
=
x
×
2 (kHz)
T
GATE
•
AMIF count mode (FMIFC or AMIFC pin)
f
AMIFC
=
x
(kHz)
T
GATE
Figure 14-5. Block Diagram of Input Pin and Mode Selection
IF counter register
AMP
1/2
AMP
AMP
FMIFC
AMIFC
FMIF count mode
AMIF count mode
AMIF count mode
Содержание mPD178053
Страница 2: ...2 User s Manual U15104EJ2V0UD MEMO ...