CHAPTER 13 PWM UNIT
443
User’s Manual U14359EJ4V0UM
<7>
<6>
5
4
3
2
1
0
Address
After Reset
PWMCn
PWMEn
ALVn
PRMn1
PRMn0
0
PWPn2
PWPn1
PWPn0
FFFFFC00H,
FFFFFC10H
40H
Bit position
Bit name
Description
7
PWMEn
Note
(n = 0, 1)
PWM Enable
This bit is used to enable or disable PWMn operation.
0: PWM operation disabled
1: PWM operation enabled
6
ALVn
(n = 0, 1)
Active Level
This bit is used to specify the active level for PWMn output.
0: Active level is low level
1: Active level is high level
The PWMn outputs inactive level (low level) of the ALVn bit after reset.
Prescaler Mode
This bit is used to select the bit length for the counter (TMPn) and compare register (CMPn).
PRMn1
PRMn0
Bit length for TMPn and CMPn
0
0
8 bits
0
1
9 bits
1
0
10 bits
1
1
12 bits
5, 4
PRMn1,
PRMn0
(n = 0, 1)
PWM Prescaler Clock Mode
This bit is used to select the PWMn’s operating clock.
PWPn2
PWPn1
PWPn0
Operating clock
0
0
0
f
XX
/2
0
0
1
f
XX
/4
0
1
0
f
XX
/8
0
1
1
f
XX
/16
1
0
0
f
XX
/32
1
0
1
f
XX
/64
Other than above
Setting prohibited
2 to 0
PWPn2 to
PWPn0
(n = 0, 1)
Note
If PWMEn is changed from 0 to 1, the counter (TMPn) is reset to start counting from 000H (in 12 bits).
The first overflow permits the PWMn signal activation. If the bit length and operating clock of PWM0
and PWM1 are the same, the activation timing of these two PWMn signals can be adjusted. If PWMEn
was already 1, the counter is not reset upon an additional write of 1. When setting PWMEn to 1, set it
to 0 beforehand.
Remarks 1.
n = 0, 1
2.
f
XX
: Internal system clock