| Electronic Components Datasheet Search |
|
AN1712 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1712 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 14 page ![]() 8/14 GENERATING A HIGH RESOLUTION SINEWAVE USING ST7 PWMART Figure 3. Loading of sample values and initialization of sin structure 3.2 AUTO-RELOAD TIMER INITIALIZATION The counter is initialized by: – Writing to the ARTARR register to set the PWM frequency. – Setting the FCRL (Force Counter Re-Load), the TCE (Timer Counter Enable) and OIE (Over- flow Interrupt Enable) bits in the ARTCSR register. In this case, the fINPUT is CPU clock (fCPU) and fCOUNTER = fINPUT (= 4MHz in this particular application). – Enable PWM0 and configure the polarity in the PWMCR register. – Initialize the PWMDCR0 register to define the PWM duty cycle. LoadValueIntoSinStructur Load sample values (already defined) into value[no_of_samples_half] of sin structure (the no of samples in half sin wave is already defined) Initialize sinewave for up- per half return Initialize Index=0 |
|
|
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 |