数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN913 数据表(PDF) 3 Page - STMicroelectronics

部件名 AN913
功能描述  PWM GENERATION WITH THE ST62 16-BIT AUTO-RELOAD TIMER
PDF  12 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN913 数据表(HTML) 3 Page - STMicroelectronics

  AN913 Datasheet HTML 1Page - STMicroelectronics AN913 Datasheet HTML 2Page - STMicroelectronics AN913 Datasheet HTML 3Page - STMicroelectronics AN913 Datasheet HTML 4Page - STMicroelectronics AN913 Datasheet HTML 5Page - STMicroelectronics AN913 Datasheet HTML 6Page - STMicroelectronics AN913 Datasheet HTML 7Page - STMicroelectronics AN913 Datasheet HTML 8Page - STMicroelectronics AN913 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 3 / 12 page
background image
3/12
PWM GENERATION WITH THE ST62 16-BIT AUTO-RELOAD TIMER
2 PULSE WIDTH MODULATION (PWM) GENERATION
Using the PWM generation capability of the ARTimer, the CPU of the microcontroller has only
to start/stop the timer and update the duty cycle. High speed PWM signals in the range of up
to 4 MHz can be generated (RLCP=1). The timer clock input frequency fint can be selected by
the oscillator clock fosc and the prescaler ratio (PSC2,PSC1 bits of SCR1 register). The PWM
signal period is controlled by the Reload register RLCP. The duty cycle is defined by the Com-
pare register CMP (see Figure 2.).
The TC register is decremented from the RLCP value to 0, then reloaded at the RLCP value
to decrement again. The PWM output is set or reset or toggled when MASK&TC=0 (de-
pending on the PWMPOL bit of the SCR4 register and the PWMMD bit of the SCR3 register)
and is reset or set or toggled when MASK&TC=MASK&CMP.
The CMP register can have any value between the RLCP value and 0, but in PWM mode, this
CMP register value should not be equal to zero.
So the RLCP value should be as high as possible, the MASK value equal to FFFFh and the
prescaler ratio as low as possible to achieve maximum resolution.
Major equations for PWM generation are:
fint = fosc / (prescaler ratio)
fPWM = fosc / ((RLCP+1)*prescaler ratio)
With PWMPOL=0
Duty cycle: (RLCP-CMP) / (RLCP+1)
With PWMPOL=1
Duty cycle: (CMP+1) / (RLCP+1)
Resolution: 1 / (RLCP+1)
With a 8 MHz oscillator and a prescaler ratio of 1, the maximum resolution (1/(RLCP=FFFFh))
leads to a PWM frequency fPWM of 122Hz. In this case an analog lowpass filter with a high
order gives an analog output equivalent to a 16 bit DAC!
Table 1. Prescaler Programming Ratio
PSC2
PSC1
PRESCALER Ratio
0
0
Clock Disabled
01
1
10
4
11
16



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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