English
Language : 

M16C6NK Datasheet, PDF (134/404 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
Under development
This document is under development and its contents are subject to change.
M16C/6N Group (M16C/6NK, M16C/6NM)
13. Timers
Timer Ai Mode Register (i = 0 to 4)
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
TA0MR to TA4MR
Address
0396h to 039Ah
After Reset
00h
Bit Symbol
TMOD0
TMOD1
Bit Name
Operation Mode Select Bit
Function
RW
b1 b0
0 0 : Timer mode
RW
0 1 : Event counter mode
1 0 : One-shot timer mode
1 1 : Pulse width modulation mode RW
MR0
RW
MR1
RW
MR2
Function varies with each operation mode
RW
MR3
RW
TCK0
TCK1
Count Source Select Bit
Function varies with each
operation mode
RW
RW
Timer Ai Register (i = 0 to 4) (1)
(b15)
(b8)
b7
b0 b7
b0
Symbol
TA0
TA1
TA2
TA3
TA4
Address
0387h to 0386h
0389h to 0388h
038Bh to 038Ah
038Dh to 038Ch
038Fh to 038Eh
After Reset
Indeterminate
Indeterminate
Indeterminate
Indeterminate
Indeterminate
Mode
Function
Setting Range RW
Timer
Mode
Divide the count source by n + 1 where n =
set value
0000h to FFFFh
RW
Event
Divide the count source by FFFFh — n + 1
Counter
where n = set value when counting up or 0000h to FFFFh
RW
Mode
by n + 1 when counting down (2)
One-shot
Timer Mode
Divide the count source by n where n = set
value and cause the timer to stop
0000h to FFFFh (3) (4)
WO
Pulse Width Modify the pulse width as follows:
Modulation PWM period: (216 — 1) / fj
Mode
High level PWM pulse width: n / fj
(16-bit PWM ) where n = set value, fj = count source
frequency
0000h to FFFEh (4) (5) WO
Pulse Width Modify the pulse width as follows:
Modulation PWM period: ( 28 — 1) ✕ (m + 1)/ fj
Mode
High level PWM pulse width: (m + 1)n / fj
(8-bit PWM ) where n = high-order address set value,
m = low-order address set value, fj =
count source frequency
00h to FEh
(High-order address)
00h to FFh
WO
(Low-order address)
NOTES:
1.The register must be accessed in 16-bit unit.
2.The timer counts pulses from an external device or overflows or underflows in other timers.
3.If the TAi register is set to "0000h", the counter does not work and timer Ai interrupt requests are
not generated either. Furthermore, if "pulse output" is selected, no pulses are output from the
TAiOUT pin.
4.Use the MOV instruction to write to the TAi register.
5.If the TAi register is set to "0000h", the pulse width modulator does not work, the output level on
the TAiOUT pin remains low, and timer Ai interrupt requests are not generated either.
The same applies when the 8 high-order bits in the TAi register are set to "00h" while operating as
an 8-bit pulse width modulator.
Figure 13.4 TA0MR to TA4MR Registers and TA0 to TA4 Registers
Rev.2.00 Nov 28, 2005 page 116 of 378
REJ09B0124-0200