R01UH0092EJ0110 Rev.1.10
Page 262 of 807
Jul 31, 2012
M16C/64C Group
17. Timer A
17.2.8
Timer Ai Register (TAi) (i = 0 to 4)
Access the register in 16-bit units. Use the MOV instruction to write to the TAi register.
Event Counter Mode
The timer counts pulses from an external device, or the overflows/underflows of other timers.
One-Shot Timer Mode
If the TAi register is set to 0000h, the counter does not work and timer Ai interrupt requests are not
generated. Furthermore, if pulse output is selected, no pulses are output from the TAiOUT pin.
Pulse Width Modulation Mode (16-bit PWM mode)
When the TAi register is set to 0000h, the counter does not work, the output level on the TAiOUT pin
remains low, and timer Ai interrupt requests are not generated.
Pulse Width Modulation Mode (8-bit PWM mode)
This mode operates as an 8-bit prescaler (lower 8 bits) and an 8-bit pulse width modulator (upper 8
bits). When the upper 8 bits of the TAi register are set to 00h, the counter does not work, the output
level on the TAiOUT pin remains low, and a timer Ai interrupt request is not generated.
(b15)
(b8)
b7
Symbol
TA0
TA1
TA2
TA3
TA4
Address
0327h to 0326h
0329h to 0328h
032Bh to 032Ah
032Dh to 032Ch
032Fh to 032Eh
Reset Value
XXXXh
XXXXh
XXXXh
XXXXh
XXXXh
b0
Setting Range
Mode
Function
RW
Timer Ai Register (i = 0 to 4)
RW
0000h to FFFFh
When n is a set value,
FFFFh - n + 1 count (at increment)
n + 1 count (at decrement)
Event counter mode
Pulse width
modulation mode
(16-bit PWM mode)
When n is a set value,
PWM period: (2
16
– 1)
fj
PWM pulse width: n
fj
0000h to FFFEh
WO
Pulse width
modulation mode
(8-bit PWM mode)
When n is an upper address setting value,
and m is a lower address setting value,
PWM period: (2
8
– 1)
×
(m + 1)
fj
PWM pulse width: (m + 1)n
fj
00h to FEh
(upper address)
00h to FFh
(lower address)
WO
b7
b0
0000h to FFFFh
When n is a setting value,
counter cycle: (n + 1)
fj
Timer mode
RW
WO
0000h to FFFFh
When n is a set value,
pulse width: n
fj
One-shot timer mode
WO
0000h to FFFFh
When n is a setting value of TAi1 register,
and m is a setting value of TAi register,
high-level duration: m
fj
low-level duration: n
fj
Programmable
output mode
fj : Count source frequency
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...