English
Language : 

3820_03 Datasheet, PDF (131/349 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.3 Timer X and timer Y
(2) Period measurement mode
In the period measurement mode, the period of a pulse input from the P55/CNTR1 pin is measured.
Operation in the period measurement mode is described below.
xStart of count operation
Immediately after reset release, the timer Y stop control bit is in the “0” state. For this reason, the
count operation is automatically started after reset release.
The value of the Y counter is decremented by 1 each time a count source is input.
The count source is f(XIN)/16 clock (low-speed mode ; f(XCIN)/16 clock).
Reload operation
At the edge of the pulse input from the P55/CNTR1 pin, the value of the Y latch is transferred
(reloaded) to the Y counter. The count value immediately before reload is held until it is read out
once after reload.
As an active edge, the falling edge ( ) or rising edge ( ) is specified by the CNTR1 active edge
switch bit.
The value of the Y latch is also reloaded at the Y counter underflow.
ŽPeriod measurement
As a period measurement duration, the following is selected by the CNTR1 active edge switch
bit (bit 6) : Duration from the falling edge to the falling edge (bit 6 = “0”)
Duration from the rising edge to the rising edge (bit 6 = “1”)
The difference between the count value at an active edge input and that immediately before reload
is a measured period.
Interrupt operation
sEdge of input pulse
At the edge of the pulse input from the P55/CNTR1 pin, an interrupt request occurs. At the same
time, the CNTR1 interrupt request bit is set to “1.” The occurrence of an interrupt is controlled by
the CNTR1 interrupt enable bit.
As an active edge, the falling edge ( ) or rising edge ( ) is specified by the CNTR1 active edge
switch bit.
sCounter underflow
An interrupt request occurs at the Y counter underflow. At the same time, the timer Y interrupt
request bit is set to “1.”
The occurrence of an interrupt is controlled by the timer Y interrupt enable bit.
Figure 2.3.7 shows a period measurement mode operation example.
2–44
3820 GROUP USER’S MANUAL