Toshiba TLCS-90 Series Data Book page 295

8 bit microcontroller
Table of Contents

Advertisement

TOSHIBA
TMP90C840
@
Freq uency measurement
The frequency of the external clock can be measured in this mode.
The
clock is input through the TI4 pin, and its frequency is calculated by
using
the
8-bit
timers
(Timer
0
and
Timer
1)
and
the
16-bit
timer/event counter (Timer 4);
The
frequency
of
the
external
clock
~s
calculated
by
using
the
frequency of the input clock to Timer 4
(TI4).
The value of the
up-counter is loaded into the capture register CAP1 at the rising edge
of the Timer Flip-flop TFF1 of 8-bit timers (Timer 0 and Timer 1), and
into CAP2 at its falling edge.
The frequency is calculated by using the number of input clock in a
certain period (the difference between the loaded values in CAPI and
CAP2 when the interrupt (INTTO or INTTl) is generated by either 8-bit
timer.
Count Clock
(Input of TI4)
-1lI11lJlJ1Jl__ _ _ __ JUlJ1JL __ _
CI
C2
TFFI
Loading UCl6 into
CI
CI
CAPI--~~ ~--------------~--------------~~--------------~-----
Loading UCl6 into
CAP2--~~~--------------~
C2
INTTO/INTTI
Fig. 3.6 (18)
Frequency Measurement
CD
Pulse width measuremnt
This mode allows to measure the
"H"
level width of an external pulse.
While keeping the 16-bit timer/event counter counting (free-running)
with the internal clock input, the external pulse is input through the
TI4 pin.
Then the capture function is used to load the UC16 values
into CAPl and CAP2 at the rising edge and falling edge of the external
trigger pulse respec t ive ly.
The interrupt INTI occ urs at the fa 11 ing
edge of TI4.
The pulse width is obtained from the difference between the values of
CAPI and CAP2 and the internal clock cycle.
Count Clock
(Internal Clock)
JUlJUlll __
CI
--~--
C2
TI4
(External Pulse)
Loading UCl6 into
CAP I
Loading UCl6 into
CAP2
INTI
CI
CI
c2
Fig. 3.6 (19)
Pulse Width Measurement
MPU90-97

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents