English
Language : 

M16C1N Datasheet, PDF (221/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
20. Precautionary Notes in Using the Device
20.3 Timer
20.3.1 Timer 1
1. Even if the prescaler 1 and Timer 1 are read out simultaneously in word-size, these registers are
read byte-by-byte in the microcomputer. Consequently, the timer value may be updated during the
period these two registers are being read.
20.3.2 Timers X, Y and Z
1. These timers stop counting after reset. Therefore, set values to Timer (X, Y, Z) and prescaler (X, Y,
Z) before starting counting.
2. Even if prescaler (X, Y, Z) and Timer (X, Y, Z) are read out simultaneously in word-size, these
registers are read byte-by-byte in the microcomputer. Consequently, the timer value may be up-
dated during the period these two registers are being read.
20.3.3 Timer X
1. Using in the timer X pulse period measurement mode, the effectual edge reception flag and the
timer X under flow flag are set to "0" by writing a "0" in a program. Writing a "1" has no effect. Write
"1" in the other flag by using the MOV instruction when you make the flag of either one side "0" by
program. (The clearance of the flag which isn't intend can be prevented.)
Example:
MOV.B
#10XXXXXXB,008BH
2. When changing to the timer X pulse period measurement mode from other mode, the contents of
the effectual edge reception flag and the timer X under flow flag are indetermind. Write "0" in the
effectual edge reception flag and the timer X under flow flag before starting the timer.
3. In the timer X pulse period measurement mode, use the MOV instruction to stop the timer.
Example:
MOV.B
#1100X00B,008BH
20.3.4 Timer Y
1. When count is stopped by writing "0" to the timer Y count start flag, the timer reloads the value of
reload register and stops. Therefore, the timer count value should be read out before the timer
stops.
2. When count is stopped by writing "0" to the timer Y count start flag, the timer Y interrupt request bit
becomes "1" and an interrupt may occur. Thus, disable interrupts before the timer stops. Further-
more, set the Timer Y interrupt request bit to "0" before starting counting again.
Rev.1.00 Oct 20, 2004 page 209 of 222
REJ090007-0100Z