PDA

View Full Version : Sinusoidal PWM generation Using PIC 18f4431



oswalam
- 1st December 2012, 05:09
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.

HenrikOlsson
- 1st December 2012, 08:27
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 (http://www.picbasic.co.uk/forum/showthread.php?t=14359) you posted the same question in) should give you enough information on how you CAN go about it.

/Henrik.

oswalam
- 21st February 2013, 05:22
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

HenrikOlsson
- 23rd February 2013, 15:49
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.