English
Language : 

M16C30P_07 Datasheet, PDF (111/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
14. Timers
Timer Ai Mode Register (i=0 to 2)
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
Address
After Reset
TA0MR to TA2MR
0396h to 0398h
00h
Bit Symbol
Bit Name
Function
RW
Operation Mode Select Bit
b1 b0
TMOD0
0 0 : Timer mode
RW
0 1 : Event counter mode
TMOD1
1 0 : One-shot timer mode
RW
1 1 : Pulse w idth modulation (PWM) mode
MR0
MR1
MR2
MR3
TCK0
TCK1
—
Count Source Select Bit
Function varies w ith each operation mode
RW
RW
RW
RW
Function varies w ith each operation mode
RW
RW
Timer Ai Register (i= 0 to 2) (1)
(b15)
(b8)
b7
b0 b7
b0
Symbol
TA0
TA1
TA2
Address
0387h, 0386h
0389h, 0388h
038Bh, 038Ah
After Reset
Indeterminate
Indeterminate
Indeterminate
Mode
Function
Setting Range
RW
Timer Mode
Event Counter
Mode
One-Shot Timer
Mode
Pulse Width
Modulation Mode
(16-Bit PWM)
Pulse Width
Modulation Mode
(8-Bit PWM)
Divide the count source by n + 1 w here n = set 0000h to FFFFh
value
RW
Divide the count source by FFFFh – n + 1 w here n 0000h to FFFFh
= set value w hen counting up or by n + 1 w hen
RW
counting dow n (5)
Divide the count source by n w here n = set value 0000h to FFFFh(2, 4)
and factor the timer to stop
WO
Modify the pulse w idth as follow s:
0000h to FFFEh(3, 4)
PWM period: (216 – 1) / f j
High level PWM pulse w idth: n / fj
WO
w here n = set value, fj = count source frequency
Modify the pulse w idth as follow s:
PWM period: (28 – 1) × (m + 1)/ f j
00h to FEh
(High-order address)
High level PWM pulse w idth: (m + 1)n / fj
w here n = high-order address set value,
00h to FFh
(Low -order address) WO
m = low -order address set value, fj = count source (3, 4)
f requenc y
NOTES :
1. The register must be accessed in 16-bit units.
2. If the TAi register is set to “0000h,” the counter does not w ork and timer Ai interrupt requests are not generated
either. Furthermore, if “pulse output” is selected, no pulses are output from the TAiOUT pin.
3. If the TAi register is set to “0000h,” the pulse w idth modulator does not w ork, the output level on the TAiOUT pin
remains low , and timer Ai interrupt requests are not generated either. The same applies w hen the 8 high-order bits
of the timer TAi register are set to “00h” w hile operating as an 8-bit pulse w idth modulator.
4. Use the MOV instruction to w rite to the TAi register.
5. The timer counts pulses from an external device or overflow s or underflow s in other timers.
Figure 14.4 TAiMR and TAi Registers
Rev.1.22 Mar 29, 2007 Page 95 of 291
REJ09B0179-0122