Rev.2.00 Oct 16, 2006 page 32 of 354
REJ09B0340-0200
M30245 Group
2. Timer A
Figure 2.2.26. Set-up procedure of pulse width modulation mode, 8-bit PWM mode selected (1)
Continued to the next page
Selecting PWM mode and functions
Selection of PWM mode
1 1
1 1 0
Count source select bit
0 0 : f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
b7 b6
16/8-bit PWM mode select bit
1 : Functions as a 8-bit pulse width modulator
Timer Ai mode register (i=0 to 4) [Address 0396
16
to 039A
16
]
TAiMR (i=0 to 4)
Clearing timer Ai interrupt request bit
Timer Ai interrupt control register
Interrupt request bit
(Please refer to the notes on the pulse width modulation mode of Timer A.)
Note 1: Set the corresponding port direction
register to “0”.
Trigger select bit
1 : Selected by event/trigger select register
0
[Addresses 0054
16
, 0045
16
, 0047
16
, 0057
16
, 0059
16
]
TAiIC (i=0 to 4)
External trigger select bit
0 : Falling edge of TAiIN pin's input signal (Note)
Count source period
f(X
IN
):16MHz f(X
CIN
):32.768kHz
b7 b6
Count
source
62.5ns
500ns
2µs
976.56µs
0
0
0
1
1
0
1
1
f
1
f
8
f
32
f
C32
b7 b0
b7 b0
1 (Must always be “1” in PWM mode)
1
Setting event/trigger select bit
One-shot start flag
[Address 0382
16
]
ONSF
Timer A0 event/trigger select bit
b7 b6
0 0 : Input on TA0
IN
is selected (Note)
Note 2: Set the corresponding port direction register to “0”.
Trigger select register
[Address 0383
16
]
TRGSR
Timer A1 event/trigger select bit
0 0 : Input on TA1
IN
is selected
(Note 2)
Timer A2 event/trigger select bit
0 0 : Input on TA2
IN
is selected
(Note 2)
Timer A3 event/trigger select bit
0 0 : Input on TA3
IN
is selected
(Note 2)
Timer A4 event/trigger select bit
0 0 : Input on TA4
IN
is selected
(Note 2)
b1 b0
b3 b2
b5 b4
b7 b6
Setting PWM's pulse's “H” level width
Can be set to 0001
16
to FFFF
16
b7 b0
b7 b0
(b15 (b8)
b7 b0
b7 b0
0
Timer A0 register [Address 0387
16
, 0386
16
] TA0
Timer A1 register [Address 0389
16
, 0388
16
] TA1
Timer A2 register [Address 038B
16
, 038A
16
] TA2
Timer A3 register [Address 038D
16
, 038C
16
] TA3
Timer A4 register [Address 038F
16
, 038E
16
] TA4
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...