| Electronic Components Datasheet Search |
|
AN1712 Datasheet(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1712 Datasheet(HTML) 4 Page - STMicroelectronics |
|
4 / 14 page ![]() 4/14 GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART 1.2 SINEWAVE GENERATION At the start of the program: – the PWMDCR0 register is initialized to obtain a 50% duty cycle – the number of samples in a sinewave cycle is defined – the counter reload value (ARTARR) is initialized In the software provided with this application note, predefined initialization values for each fre- quency can be selected in the define.h file. More than 18 samples in a sinewave cycle should be selected to generate a sinewave with Total Harmonic Distortion of less than 5%. So, depending on the number of samples in a sin- ewave cycle, the duty cycle register (PWMDCR0) is modified, taking care that no 0% and 100% PWM is generated for any of the sinewave samples (because the PWM duty cycle must be between ~99% to ~1% to generate an undistorted sinewave). The PWM duty cycle is changed after a certain number (“COUNTER”) of overflow cycles. So, the sinewave frequency depends on three parameters, – the PWM frequency (fPWM) – the number of samples in a sinewave cycle – the number of overflow cycles after which the PWM duty cycle changes (“COUNTER”) So, the sinewave frequency can be given by: See also Figure 2. This PWM signal must be filtered with an external RC network selected for the filtering level re- quired to generate a sinusoid. The cut off frequency of low pass RC filter is given as: So, the value of R and C must be chosen in such a way that the output sinewave frequency should be less than this high cut off frequency (fH). The instantaneous value of sinewave depends on the duty cycle of PWM. So: fSINE = 1 tPWM * number of samples * COUNTER fH = 1 2 * pi * R * C VSINE max,min = Max, Min PWM duty cycle * VDD VSINE average = Average PWM duty cycle * VDD |
|
|
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 |
| 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 |