135
Chapter 7 Timer/Counter Units
7
(4) PWM output operation
In PWM output operation, a pulse signal with a duty factor determined by the value set in a compare register
is output. (See
Fig. 7-35
.)
The duty factor of a PWM output signal can be changed in steps of 1/65536 from 1/65536 to 65535/65536.
In addition, 16-bit timer 0 (TM0) has two compare registers, so that two types of PWM signals can be output.
Fig. 7-36 shows the setting of control registers. Fig. 7-37 shows the setting procedure. Fig. 7-38 shows the
procedure for changing the duty factor of PWM output.
Fig. 7-35 Example of PWM Signal Output by 16-Bit Timer/Counter
FFFFH
FFFFH
FFFFH
CR00
CR00
CR00
Timer starts
0H
TM0
count value
(active low)
TO0
Fig. 7-36 Setting of Control Registers for PWM Output Operation
(a) Timer control register 0 (TMC0)
(b) Capture/compare control register 0 (CRC0)
7
6
5
4
3
2
1
0
1
0
0
0
0
0
0
1
CRC0
Disables clearing TM0
Both TO0 and TO1 are used for
PWM output
(c) Timer output control register (TOC)
(d) Port 3 mode control register (PMC3)
★
7
6
5
4
3
2
1
0
TOC
1
1
×
×
×
×
×
×
TO0 for low-active PWM signal output
Enables PWM output for TO0
7
6
5
4
3
2
1
0
×
×
×
×
×
×
×
1
PMC3
Specifies P34 pin as TO0
output
7
6
5
4
3
2
1
0
0
0
0
0
0
0
1
TMC0
Overflow flag
Enables counting TM0
×
Summary of Contents for PD78212
Page 11: ......
Page 53: ...24 ...
Page 61: ...32 µPD78214 Sub Series 9 VSS Ground 10 NC non connection Not connected inside the chip ...
Page 65: ...36 ...
Page 83: ...54 ...
Page 135: ...106 ...
Page 271: ...242 ...
Page 405: ...376 ...
Page 417: ...388 ...
Page 423: ...394 ...
Page 449: ...420 ...
Page 457: ...428 ...
Page 471: ...442 ...
Page 487: ...458 ...