English
Language : 

AN590 Datasheet, PDF (1/7 Pages) STMicroelectronics – PWM GENERATION WITH ST62 AUTO-RELOAD TIMER
AN590
APPLICATION NOTE
PWM GENERATION WITH ST62 AUTO-RELOAD TIMER
by Microcontroller Division Applications
INTRODUCTION
This note describes how to use the ST62 Auto-reload Timer (ARTimer) to generate a PWM
signal with tunable frequency and duty cycle. As an example, the generation of a 31.25kHz
PWM signal with duty cycle proportional to an analog input voltage is presented.
Auto-reload Timer description
This timer is an 8 bit timer/counter with prescaler. It includes auto-reload PWM, capture and
compare capability with one input and one output pin. It is controlled by the following registers
(8 bit):
– Mode Control Register (MC)
– Status registers (SC0, SC1)
– Load register (LR)
– Incremental counter register (TC)
– Compare register (CP)
– Reload/Capture register (RC)
It can also wake up the MCU from wait mode and exit from stop mode if an external event is
present on the input pin. The prescaler ratio can be programmed to choose the timer input fre-
quency FIN (see Table 1).
Figure 1. Auto-reload Timer Block Diagram
AN590/0703
1/7
1