One-Shot Timer Mode - Renesas M16C/29 Series User Manual

Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M
1
6
C
2 /
9
G
o r
u
p

12.1.3 One-shot Timer Mode

In one-shot timer mode, the timer is activated only once by one trigger. (See Table 12.4) When the
trigger occurs, the timer starts up and continues operating for a given period. Figure 12.11 shows the
TAiMR register in one-shot timer mode.
Table 12.4 Specifications in One-shot Timer Mode
Item
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request generation timing
TAi
pin function
IN
TAi
pin function
OUT
Read from timer
Write to timer
Select function
R
e
. v
1
1 .
2
M
r a
3 .
, 0
2
0
0
7
R
E
J
0
9
B
0
1
0
1
0 -
1
1
2
f
, f
, f
, f
, f
1
2
8
32
C32
• Decrement
• When the counter reaches 0000
• If a trigger occurs when counting, the timer reloads a new count and restarts counting
1/n
n : set value of TAi register
However, the counter does not work if the divide-by-n value is set to 0000
TAiS bit in the TABSR register is set to 1 (start counting) and one of the
following triggers occurs.
• External trigger input from the TAi
• Timer B2 overflow or underflow,
timer Aj (j=i-1, except j=4 if i=0) overflow or underflow,
timer Ak (k=i+1, except k=0 if i=4) overflow or underflow
• The TAiOS bit in the ONSF register is set to 1 (timer starts)
• When the counter is reloaded after reaching 0000
• TAiS bit is set to 0 (stop counting)
When the counter reaches 0000
I/O port or trigger input
I/O port or pulse output
An undefined value is read by reading TAi register
• When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
• When counting (after 1st count source input)
Value written to TAi register is written to only reload register
(Transferred to counter when reloaded next)
• Pulse output function
The timer outputs a low when not counting and a high when counting.
page 112
f o
4
5
8
Specification
, it stops counting after reloading a new value
16
0000
to FFFF
16
pin
IN
16
16
12. Timer A
16
16
.

Advertisement

Table of Contents
loading

Table of Contents