English
Language : 

M16C1N Datasheet, PDF (97/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
12. Timers
12.3.1 Timer Mode
In this mode, the timer counts an internally generated count source.
(See Table 12.8) The Timer Y secondary is unused in this mode. Figure 12.17 shows the Timer Y, Z
mode register and Timer Y, Z waveform output control register in timer mode.
Table 12.8 Specifications of timer mode
Item
Specification
Count source
f1, f8, on-chip oscillator output, fC32
Count operation
• Down count
• When the timer underflows, it reloads the reload register contents before continuing
counting (When the Timer Y underflows, the contents of the Timer Y primary reload
register is reloaded.)
• When a counting stops, the timer reloads the content of the reload register before it
Divide ratio
stops.
1
(n+1) X (m+1)
n: Set value of Prescaler Y, m: Set value of Timer Y primary
Count start condition
Count start flag is set (=1)
Count stop condition
Count start flag is reset (=0) (Note 1)
Interrupt request generation timing When Timer Y underflows
TYOUT pin function
Programmable I/O port
Read from timer
Count value can be read out by reading Timer Y primary register.
Same applies to Prescaler Y register.
Write to timer
When a value is written to Timer Y Primary register, it is written to both reload register
and counter or written to only reload register. Selected by software.
Same applies to Prescaler Y register.
Select function
• Timer Y write control function (Note 2)
When a value is written to Timer Y Primary register, it can be selected that the value is
written to both reload register and counter or written to only reload register.
Same applies to Prescaler Z register.
Note 1: When the count is stopped, the Timer Y interrupt request bit becomes "1" and an interrupt may occur. Thus,
interrupts must be disabled before the count is stopped. Furthermore, set the Timer Y interrupt request bit to "0"
before starting counting again.
Note 2: If writing to the Timer Y or prescaler Y under the following conditions being filled at the same time the Timer Y
interrupt request bit becomes "1" and an interrupt occurs.
<Conditions>
• Timer Y write control bit (bit 2 at address 008016) is "0" (write to timer and reload register simultaneously)
• Timer Y count start flag (bit 3 at address 008016) is "1" (count start)
To write to the Timer Y or prescaler Y in the above state, disable interrupts before writing.
Rev.1.00 Oct 20, 2004 page 85 of 222
REJ09B0007-0100Z