One-Shot Timer Mode - Renesas M16C Series User Manual

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

Advertisement

M30240 Group
(1) Down count
Counter value
(Hex.)
Read value
(Hex.)
n = reload register content
Figure 2.30: Reading Timer Ai register in Event Counter mode
Figure 2.31: Standard 2-phase pulses

2.2.3.3 One-shot timer mode

(1) At reset, the count start flag is set to "0". Set a value in the Timer Ai register, then set the flag to "1".
(2) Setting the count start flag to "0" while the count is in progress causes the following:
• The counter stops counting and the contents of the reload register is reloaded.
• The TAiOUT pin outputs "L" level.
• The interrupt request is generated and the Timer Ai interrupt request bit goes to "1".
(3) The output from the one-shot timer synchronizes with the count source generated internally.
Therefore, when an external trigger has been selected, a delay of one cycle of the maximum count
source occurs between the trigger input to the TAiIN pin and the one-shot timer output (See Figure 2.32).
(4) The Timer Ai interrupt request bit goes to "1" if the timer's operation mode is set using any of the
following procedures:
• Selecting one-shot timer mode after reset.
• Changing operation mode from timer mode to one-shot timer mode.
• Changing operation mode from event counter mode to one-shot timer mode.
Therefore, to use the Timer Ai interrupt, set the Timer Ai interrupt request bit to "0" after the changes
listed above have been made.
(5) If a trigger occurs while a count is in progress, after the counter performs one down count following
the reoccurrence of a trigger, the reload register contents are reloaded, and the count continues. To
generate a trigger while a count is in progress, generate the second trigger at least one cycle of the
timer's count source after the previous trigger occurred.
Rev.1.00 Sep 24, 2003 Page 170 of 360
Reload
2
1
0
n
n – 1
n – 1
2
1
0
FFFF
Time
T1
TA2
IN
TA3
IN
TA4
IN
TA2
OUT
TA3
OUT
T2
T3
TA4
OUT
(2) Up count
Reload
Counter value
FFFD FFFE FFFF
(Hex.)
Read value
FFFD FFFE FFFF 0000 n + 1
(Hex.)
n = reload register content
Vcc = 5V, f(X
) = 12MHz
IN
T1
T2, T3
(Min.)
(Min.)
800 s
200ns
Timer A
n
n + 1
Time

Advertisement

Table of Contents
loading

Table of Contents