| 数据搜索系统,热门电子元器件搜索 |
|
AN590 数据表(PDF) 3 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN590 数据表(HTML) 3 Page - STMicroelectronics |
|
3 / 7 page ![]() 3/7 PWM GENERATION WITH ST62 AUTO-RELOAD TIMER Figure 2. PWM Timer Operation Example 1 : Target: Generate a 12kHz PWM signal with a duty cycle of 37%, using an oscillator frequency of 4MHz: We want to generate a periodic signal at a frequency of 12 kHz and a duty cycle of 37% . The CPU frequency (quartz frequency) is 4 MHz. Let’s try with a prescaler ratio of 3: FIN = 4 MHz / 3 = 1333.33 kHz 12 kHz = 1333.33 kHz / (256d - RC) gives RC = 144.889, rounded to 145 Resolution = 1 /(256 - 145) = 1 / 111 Duty cycle desired: 37% 0.37 = (CP - 145) / (256 - 145) yields CP = 186.07, rounded to 186. Summary: prescaler = 3, RC = 145d, CP = 186d: these numbers yield a PWM frequency of 12.012 kHz, a duty cycle of 36.94 % and a resolution of 0.9 %, which is very close to the initial goal. |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| 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 |