Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN590 Datasheet(PDF) 2 Page - STMicroelectronics

Part # AN590
Description  PWM GENERATION WITH ST62 AUTO-RELOAD TIMER
PDF  7 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN590 Datasheet(HTML) 2 Page - STMicroelectronics

  AN590 Datasheet HTML 1Page - STMicroelectronics AN590 Datasheet HTML 2Page - STMicroelectronics AN590 Datasheet HTML 3Page - STMicroelectronics AN590 Datasheet HTML 4Page - STMicroelectronics AN590 Datasheet HTML 5Page - STMicroelectronics AN590 Datasheet HTML 6Page - STMicroelectronics AN590 Datasheet HTML 7Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 2 / 7 page
background image
2/7
PWM GENERATION WITH ST62 AUTO-RELOAD TIMER
Pulse Width Modulation (PWM) Generation
Using the PWM generation capability of the AR-Timer, the microcontroller CPU has only to
start/stop the timer and update the duty cycle. High speed PWM signals in the range of
100kHz can be generated. The timer clock input frequency FIN can be selected by the oscillator
clock fosc and the prescaler ratio. The PWM signal period is controlled by the Reload register.
The duty cycle is defined by the Compare register CP (see Figure 2).
The register TC is incremented from RC to 255d, then reloaded at RC to count again. The
PWM output is set on the overflow of TC and reset when TC=CP.
CP can have any value between RC and 255d. So RC should be minimal and the prescaler
ratio as small as possible to achieve a maximum resolution.
Major formulae for PWM generation are:
FIN = fosc / (prescaler ratio)
FPWM = FIN / (256 - RC)
Duty cycle: (CP -RC) / (256 - RC)
Resolution: 1 / (256 - RC)
With a 8MHz oscillator and a prescaler ratio of 1, the maximum resolution (1/256) leads to a
PWM frequency FPWM of 31.25kHz. A resolution of 1/64 allows to increase FPWM to 125kHz.
Table 1. Prescaler Programming Ratio
Bit 0
Reg.SC1
PS2
PS1
PS0
PRESCALER
Ratio
00
0
0
1
00
0
1
2
00
1
0
4
00
1
1
8
01
0
0
16
01
0
1
32
01
1
0
64
01
1
1
128
10
0
0
3
10
0
1
6
10
1
0
12
10
1
1
24
11
0
0
48
11
0
1
96
11
1
0
192
11
1
1
384
2



Html Pages

1 2 3 4 5 6 7


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com