Download Print this page

Renesas M16C/50 Series User Manual page 298

Advertisement

M16C/5L Group, M16C/56 Group
15.3.5
One-Shot Timer Mode
In one-shot timer mode, the timer is activated only once per trigger. When the trigger occurs, the timer
starts and continues operating for a given period. Table 15.12 lists One-Shot Timer Mode
Specifications. Table 15.13 lists Registers and the Setting in One-Shot Timer Mode. Figure 15.10
shows Operation Example in One-Shot Timer Mode.
Table 15.12
One-Shot Timer Mode Specifications
Item
Count source
Count operations
Pulse width
Count start condition
Count stop condition
Interrupt request
generation timing
TAiIN pin function
TAiOUT pin function
Read from timer
Write to timer
Selectable functions
i = 0 to 4
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, fOCO-F, fOCO-S, fC32
Decrement
When the timer counter reaches 0000h, it stops running after the reload
register value is reloaded
When a trigger occurs while counting, the reload register value is reloaded into
the counter to continue counting
n
n
-- -
fj
n:
Set value of the TAi register, 0000h to FFFFh
However, the counter does not run if 0000h is set.
fj:
Count source frequency
The TAiS bit in the TABSR register is 1 (start counting) and one of the following
triggers occurs:
External trigger input from the TAiIN pin
Timer B2 overflow or underflow
Timer Aj overflow or underflow (j = i - 1, except j = 4 if i = 0)
Timer Ak overflow or underflow (k = i + 1, except k = 0 if i = 4)
The TAiOS bit in the ONSF register is set to 1 (one-shot timer start).
When the counter is reloaded after reaching 0000h
The TAiS bit is set to 0 (stop counting)
When the counter reaches 0000h
I/O port or trigger input
I/O port or pulse output
An undefined value is read when reading the TAi register.
When not counting and until the first count source is input after counting starts,
the value written to the TAi register is written to both the reload register and
counter.
When counting (after the first count source input), the value written to the TAi
register is written to only the reload register (transferred to the counter when
reloaded next time).
Pulse output function
The timer outputs a low-level signal when not counting and a high-level signal
when counting.
Output polarity control
The output polarity of the TAiOUT pin is inverted. (While the TAiS bit is set to 0
(stop counting), a high-level signal is output.)
Specification
15. Timer A
Page 261 of 803

Advertisement

loading