deveopmen
Rev.B2 for proof reading
Usage precaution
Mitsubishi Microcomputers
M32C/83 group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
335
Usage Precaution
Timer A (timer mode)
(1) Reading the timer Ai register while a count is in progress allows reading, with arbitrary timing, the
value of the counter. Reading the timer Ai register while reloading gets
“
FFFF
16
”
. Reading the timer Ai
register after setting a value in the timer Ai register with a count halted but before the counter starts
counting gets a proper value.
Timer A (event counter mode)
(1) Reading the timer Ai register while a count is in progress allows reading, with arbitrary timing, the
value of the counter. Reading the timer Ai register while reloading gets
“
FFFF
16
”
by underflow or
“
0000
16
”
by overflow. Reading the timer Ai register after setting a value in the timer Ai register with a
count halted but before the counter starts counting gets a proper value.
(2) When stop counting in free run type, set timer again.
(3) In the case of using as
“
Free-Run type
”
, the timer register contents may be unknown when counting
begins. If the timer register is set before counting has started, then the starting value will be unknown.
In the case where the up/down count will not be changed.
Enable the
“
Reload
”
function and write to the timer register before counting begins. Rewrite
the value to the timer register immediately after counting has started. If counting up, rewrite
“
0000
16
”
to the timer register. If counting down, rewrite
“
FFFF
16
”
to the timer register. This
will cause the same operation as
“
Free-Run type
”
mode.
In the case where the up/down count has changed.
First set to
“
Reload type
”
operation. Once the first counting pulse has occurred, the timer
may be changed to
“
Free-Run type
”
.
Timer A (one-shot timer mode)
(1) Setting the count start flag to
“
0
”
while a count is in progress causes as follows:
The counter stops counting and a content of reload register is reloaded.
The TAi
OUT
pin outputs
“
L
”
level.
The interrupt request generated and the timer Ai interrupt request bit goes to
“
1
”
.
(2) The output from the one-shot timer synchronizes with the count source generated internally. There-
fore, when an external trigger has been selected, a delay of one cycle of count source as maximum
occurs between the trigger input to the TAi
IN
pin and the one-shot timer output.
(3) 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 timer Ai interrupt (interrupt request bit), set timer Ai interrupt request bit to
“
0
”
after
the above listed changes have been made.
(4) 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 after an elapse longer
than one cycle of the timer's count source after the previous trigger occurred.