|
3825_03 Datasheet, PDF (111/339 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER | |||
|
◁ |
APPLICATION
2.3 Timer X and timer Y
Pulse width
Pulse width H(s) = 1 ÷ count source frequency ! (the X counter initial value â the X counter value at count stop)
Pulse width measurement mode operation example
â¢n : The X counter initial value
â¢m: The X counter value at count stop
Timer X stop
coutrol bit
Count
source
P54/CNTR0 pin
CNTR0 active
edge switch bit
n16
Set initial value
to counter
2
Count start
Set initial value
to counter
Count start
2
m16
000016
CNTR0 interrupt
request bit
CNTR0 interrupt
enable bit
Timer X interrupt
request bit
Timer X interrupt
enable bit
Count stop
H
1
H Time
1 : â¢Clearing by writing â0â to the CNTR0 interrupt request bit.
â¢Clearing by accepting the CNTR0 interrupt request when the CNTR0 interrupt enable bit
is â1.â
2 : Set initial value to the timer X when timer X write control bit is â0.â
V : When the CNTR0 active edge switch bit is â1â ;
â¢âLâ level width of the input pulse is measured.
â¢The CNTR0 interrupt request occurs at the rising edge of the input pulse.
Fig. 2.3.4 Pulse width measurement mode operation example
3825 GROUP USERâS MANUAL
2â39
|
▷ |