CHAPTER 6 16-BIT TIMER/EVENT COUNTER
137
User’s Manual U11302EJ4V0UM
6.5.2 PWM output operations
By setting bits 1 to 3 (TMC01 to TMC03) of the 16-bit timer mode control register (TMC0) to 1, 0, 0, the 16-bit timer/
event counter operates as PWM output. Pulses with a duty determined by the value set in the 16-bit compare register
(CR00) beforehand are output from the TO0/P30 pin.
Set the active level width of the PWM pulse to the higher 14 bits of CR00. Select the active level using bit 1 (TOC01)
of the 16-bit timer output control register (TOC0).
This PWM pulse has a 14-bit resolution. The pulse can be converted to an analog voltage by integrating it with
an external low-pass filter (LPF). The PWM pulse has a combination of the basic cycle determined by 2
8
/
φ
and the
sub-cycle determined by 2
14
/
φ
so that the time constant of the external LPF can be shortened. Count clock
φ
can
be selected using bits 4 to 6 (TCL04 to TCL06) of timer clock select register 0 (TCL0).
PWM output enable/disable can be selected using bit 0 (TOE0) of TOC0.
Cautions 1. CR00 should be set after selecting the PWM operation mode.
2. Be sure to write 0 to bits 0 and 1 of CR00.
3. Do not select the PWM operation mode when an external clock is input from the TI0/P00 pin.
By integrating 14-bit resolution PWM pulses with an external low-pass filter, they can be converted to an analog
voltage and used for electronic tuning and D/A converter applications, etc.
The analog output voltage (V
AN
) used for D/A conversion with the configuration shown in Figure 6-12 is as follows.
Compare register (CR00) value
V
AN
= V
REF
x
2
16
V
REF
: External switching circuit reference voltage
Figure 6-12. Example of D/A Converter Configuration with PWM Output
V
REF
PD780205
PWM
signal
TO0/P30
Switching
circuit
Low-pass filter
Analog output (V
AN
)
µ
Содержание mPD780208 Subseries
Страница 2: ...2 User s Manual U11302EJ4V0UM MEMO...