Renesas M16C/6NK Technical Information Seite 140

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 412
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 139
Rev.2.10 Apr 14, 2006 page 116 of 378
REJ09B0124-0210
M16C/6N Group (M16C/6NK, M16C/6NM) 13. Timers
Figure 13.4 Registers TA0MR to TA4MR, and TA0 to TA4
Timer Ai Mode Register (i = 0 to 4)
TA0MR to TA4MR
Bit Name FunctionBit Symbol
RW
b7 b6 b5 b4 b3 b2 b1 b0
0 0 : Timer mode
0 1 : Event counter mode
1 0 : One-shot timer mode
1 1 : Pulse width modulation mode
b1 b0
Count source select bits
RW
RW
RW
RW
RW
RW
RW
RW
Function varies depending on
operating mode
Symbol
Function varies depending on operating mode
Operating mode select bits
TCK1
MR3
MR2
MR1
TMOD1
MR0
TMOD0
TCK0
0396h to 039Ah 00h
Address After Reset
Symbol Address After Reset
TA0 0387h, 0386h
0389h, 0388h
038Bh, 038Ah
038Dh, 038Ch
038Fh, 038Eh
Undefined
TA1 Undefined
TA2 Undefined
TA3 Undefined
TA4
b7 b0 b7 b0
(b15) (b8)
Timer Ai Register (i = 0 to 4)
(1)
RW
Divide the count source by n + 1 where n =
set value
Function Setting Range
Divide the count source by n where n = set
value and cause the timer to stop
Modify the pulse width as follows:
PWM period: (2
16
1) / fj
High level PWM pulse width: n / fj
where n = set value, fj = count source
frequency
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.
RW
RW
WO
WO
WO
Timer
mode
Event
counter
mode
One-shot
timer mode
Pulse width
modulation
mode
(16-bit PWM )
Pulse width
modulation
mode
(8-bit PWM )
0000h to FFFFh
0000h to FFFFh
00h to FEh
(High-order address)
00h to FFh
(4) (5)
(Low-order address)
0000h to FFFFh
(3) (4)
0000h to FFFEh
(4) (5)
Mode
Modify the pulse width as follows:
PWM period: (2
8
1) (m + 1)/ fj
High level PWM pulse width: (m + 1)n / fj
where n = high-order address set value,
m = low-order address set value, fj =
count source frequency
Divide the count source by FFFFh
n + 1
where n = set value when counting up or
by n + 1 when counting down
(2)
Undefined
Seitenansicht 139
1 2 ... 135 136 137 138 139 140 141 142 143 144 145 ... 411 412

Kommentare zu diesen Handbüchern

Keine Kommentare