Download Print this page

Renesas M16C/50 Series User Manual page 285

Advertisement

M16C/5L Group, M16C/56 Group
15.3.2
Timer Mode
In timer mode, the timer counts an internally generated count source. Table 15.6 lists Timer Mode
Specifications, Table 15.7 lists Registers and the Setting in Timer Mode, and Figure 15.5 shows an
Operation Example in Timer Mode.
Table 15.6
Timer Mode Specifications
Item
Count source
Count operation
Counter cycles
Count start condition
Count stop condition
Interrupt request generation
timing
TAiIN pin function
TAiOUT pin function
Read from timer
Write to timer
Selectable functions
i = 0 to 4
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, fOCO-F, fOCO-S, fC32
Decrement
When the timer underflows, it reloads the reload register value and
continues counting.
(
)
n
+
1
----------------- -
fj
n: set value of TAi register, 0000h to FFFFh
fj: frequency of count source
Set the TAiS bit in the TABSR register to 1 (start counting).
Set the TAiS bit to 0 (stop counting).
Timer underflow
I/O port or gate input
I/O port or pulse output
The count value can be read by reading the TAi register.
When not counting
Value written to the TAi register is written to both the reload register and counter.
When counting
Value written to the TAi register is only written to reload register
(transferred to counter when reloaded next).
Gate function
Counting can be started and stopped by an input signal to the TAiIN pin.
Pulse output function
Whenever the timer underflows, the output polarity of the TAiOUT pin is inverted.
When the TAiS bit is set to 0 (stop counting), the pin outputs a low-level signal.
Output polarity control
The output polarity of the TAiOUT pin is inverted. (While the TAiS bit is set to 0
(stop counting), a high-level signal is output .)
Specification
15. Timer A
Page 248 of 803

Advertisement

loading