R01UH0136EJ0210 Rev.2.10
Page 291 of 800
Jul 31, 2012
M16C/64A Group
17. Timer A
17.3.7
Programmable Output Mode (Timers A1, A2, and A4)
In programmable output mode, the timer outputs low- and high-levels of pulse width successively. Table
17.16 lists Programmable Output Mode Specifications. Table 17.17 lists Registers and the Setting in
Programmable Output Mode. Figure 17.13 shows Operation Example in Programmable Output Mode.
Table 17.16
Programmable Output Mode Specifications
Item
Specification
Count sources
f1TIMAB, f2TIMAB, f8TIMAB, f32TIMAB, f64TIMAB, fOCO-S, fC32
Count operations
•
Decrement
•
The timer reloads the reload register value at the rising edge of pulse and
continues counting
•
When a trigger occurs while counting, the timer is not affected.
Pulse width
•
High-level pulse width
•
Low-level pulse width
m: set value of the TAi register
n: set value of the TAi1 register
fj: count source frequency
Count start conditions
•
The TAiS bit of the TABSR register is set to 1 (start counting).
•
The TAiS bit is 1 and external trigger input from the TAiIN pin
•
The TAiS bit is 1 and one of the following external triggers occurs:
Timer B2 overflow or underflow
Timer Aj overflow or underflow (j = i - 1)
Timer Ak overflow or underflow (k = i + 1, except k = 0 if i = 4)
Count stop condition
The TAiS bit is set to 0 (stop counting).
Interrupt request
generation timing
At the rising edge of pulse
TAiIN pin function
I/O port or trigger input
TAiOUT pin function
Pulse output
Read from timer
An undefined value is read when reading registers TAi and TAi1.
Write to timer
•
When writing to registers TAi and TAi1 while not counting, the value is written
to both reload register and counter.
•
When writing to registers TAi and TAi1 while counting, the value is written to
the reload register. (transferred to the counter when reloaded next time).
Selectable functions
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.)
i = 1, 2, and 4
m
fj
-----
m
n
n
fj
---
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...