96
CHAPTER 6 8-BIT TIMER/EVENT COUNTERS 5 AND 6
6.4.4 PWM output operations
Setting the 8-bit timer mode control registers 5 and 6 (TMC5 and TMC6) as shown in Figure 6-13 allows operation
as PWM output. Pulses with the duty ratio determined by the values preset in the 8-bit compare registers 50 and
60 (CR50 and CR60) output from the TO5/P100/TI5 or TO6/P101/TI6 pin.
Select the active level of PWM pulse with bit 1 (TMC51) of 8-bit timer mode control register 5 (TMC5) or bit 1
(TMC61) of 8-bit timer mode control register 6 (TMC6).
This PWM pulse has an 8-bit resolution. The pulse can be converted into an analog voltage by integrating it with
an external low-pass filter (LPF). Count clock of 8-bit timer register 5 (TM5) can be selected with timer clock select
register 5 (TCL5) and count clock of 8-bit timer register 6 (TM6) can be selected with timer clock select register 6
(TCL6).
PWM output enable/disable can be selected with bit 0 (TOE5) of TMC5 or bit 0 (TOE6) of TMC6.
Figure 6-13. 8-Bit Timer Mode Control Register Settings for PWM Output Operation
Remarks 1. n = 5, 6
2. × : don’t care
1
TCEn
1
TMCn6
00×
LVSn LVRn TMCn1 TOEn
TMCn ×0/1 1
TOn output enable
Sets active level
PWM mode
TMn operation enable