Sinusoidal PWM generation Using PIC 18f4431

# Thread: Sinusoidal PWM generation Using PIC 18f4431

1. ## Sinusoidal PWM generation Using PIC 18f4431

hello, i am new to this forum, I am final year electrical engg. student, my project is 'Speed control of Induction motor using PCPWM in PIC18f4431'. Plz guide me how to go about it, i want to write a code for sinusoidal PWM generation using PCPWM in edge aligned mode.

2. Did you find this post helpful? |

## Re: Sinusoidal PWM generation Using PIC 18f4431

Hi,
If you're new to PIC or microcontrollers in general then you need to start with the obligatory blink-a-led program and work your way up from there. If you know your way around PICs and PBP then spending some time actually reading thru other threads on this very topic (like for example the other thread you posted the same question in) should give you enough information on how you CAN go about it.

/Henrik.

3. Did you find this post helpful? |

## Re: Sinusoidal PWM generation Using PIC 18f4431

How to prepare sine table for Sinusoidal PWM generation? i mean for which frequency sine table is to be designed if my operating range is 5hz to 50 hz

4. Did you find this post helpful? |

## Re: Sinusoidal PWM generation Using PIC 18f4431

You select the number of entries in the table based on how "pure" the output needs to be and how fast you are able to index the table. The more entries the "better" the sine output will be but it require you to index the table at a faster rate to get the desired output frequency. If your maximum output frequency is 50Hz and you have a SIN table with 64 entries for a full a period you need to index the table and update the PWM dutycycles 50*64=3200 times per second. When the output frequency is 5Hz you index the table and update the PWM dutycycles 5*64=320 times per second.

/Henrik.