Timer Functions; Fig. 2.6.2 Timer Overflow Timing - Renesas 7200 Series User Manual

Mitsubishi 8-bit single-chip microcomputer
Table of Contents

Advertisement

2.6.1 Timer functions

There are four timers; Timer 1, Timer 2, Timer 3, Timer 4 and each timer has an 8-bit reload latch. All
timers are the count-down type, and when the timer latch value is "n", the divide ratio is 1/(n+1)("n" = 0
to 255). When the valve "n" is written to reload latch, is also set "n" to its timer, simultaneously.
Timer value is counted down each rising edge of count source. The timer overflows at the count next pulse,
after the count value reaches "00
the reload latch value "n" is set (reload) to timer, and timer continues to count down. The divide ratio is
1/(n+1). Make sure that set "n" in the range "00

Fig. 2.6.2 Timer overflow timing

(1) Timer 1
Timer 1 can select one of the following count sources:
f(X
)/16
IN
f(X
)/4096
IN
(This is a clock by f(X
The count source of timer 1 is selected by setting bit 0 of the timer 12 mode register (address
00F4
).
16
Timer 1 interrupt request occurs at timer 1 overflow.
(2) Timer 2
Timer 2 can select one of the following count sources:
f(X
)/16
IN
Timer 1 overflow signal
External clock from pin P2
The count source of timer 2 is selected by setting bits 4 and 1 of the timer 12 mode register (address
00F4
). When timer 1 overflow signal is a count source for timer 2, timer 1 functions as an 8-bit
16
prescaler.
Timer 2 interrupt request occurs at timer 2 overflow.
," and the interrupt request occurs. At the same time of timer overflow,
16
Count source
nn
Timer
16
Writing Value
Overflow signal
)/4096 interrupt and is valid only when PWM count source is supplied.)
IN
/TIM2
4
7220 Group User's Manual
FUNCTIONAL DESCRIPTION
" to "FF
."
16
16
nn
-1
01
00
16
16
16
Interrupt request
nn
nn
-1
16
16
2.6 Timers
2-35

Advertisement

Table of Contents
loading

This manual is also suitable for:

7220

Table of Contents