Table of Contents

Advertisement

M16C/64C Group
17.3.2

Timer Mode

In timer mode, the timer counts an internally generated count source. Table 17.6 lists Timer Mode
Specifications, Table 17.7 lists Registers and the Setting in Timer Mode, and Figure 17.5 shows an
Operation Example in Timer Mode.
Table 17.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
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, 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
17. Timer A
Page 270 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents