One-Shot Timer Mode - External Trigger Selected - Renesas M16C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30240 Group

2.2.2.9 One-shot timer mode - External trigger selected

In one-shot timer mode, select functions from those listed in Table 2.10 . An example using the indicated
options is described below. Figure 2.23 shows the operation timing, and Figure 2.24 shows the set-up
procedure.
Table 2.10:
Timer A one-shot timer mode, external trigger functions
Item
Count source
O
Pulse output function
O
O
Count start condition
Note:
j = i - 1, but j = 4 when i = 0; k = i + 1, but k = 0 when i = 4
Operation
(1) If the TAiIN pin input level changes from "L" to "H" with the count start flag set to "1", the counter
performs a down count on the count source. At this time, the TAi
(2) If the value of the counter becomes "0000
reloads the content of the reload register and stops counting. At this time, the Timer Ai interrupt re-
quest bit goes to "1".
(3) If a trigger occurs while a count is in progress, the counter reloads the value of the reload register
again and continues counting. The reload timing is in step with the next count source input after the
trigger.
(4) Setting the count start flag to "0" causes the counter to stop and to reload the content of the reload
register. Also, the TAi
to "1".
FFFF
0001
Count start flag
TAi
pin
IN
input signal
One-shot pulse output
from TAi
pin
OUT
Timer Ai interrupt
request bit
Figure 2.23: Operation timing of one-shot mode, external trigger selected
Rev.1.00 Sep 24, 2003 Page 163 of 360
Internal count source (f1/f8/f32)
No pulses output
Pulses output
External trigger input (falling edge of input signal to the TAi
External trigger input (rising edge of input signal to the TAi
Timer overflow (TB2/TAj/TAk overflow)
Writing "1" to the one-shot start flag
pin outputs an "L" level. At this time, the Timer Ai interrupt request bit goes
OUT
n = reload register content
(2) Stop count
16
(1) Start count
n
Reload
16
Set to "1" by software
"1"
Trigger during count
"0"
"H"
"L"
1 / fi X (n)
"H"
"L"
"1"
"0"
Cleared to "0" when interrupt request is accepted, or cleared by software
Set-up
pin output level goes to "H" level.
OUT
" the TAi
pin outputs an "L" level, and the counter
16
OUT
(3) Start count
Start count
Reload
Cleared to "0" by software
1 / fi X (n+1)
Timer A
pin)
IN
pin)
IN
(4) Stop count
Reload
Time

Advertisement

Table of Contents
loading

Table of Contents