Page 1 of 1

PWM Pic 18F4331

Posted: Fri Jan 15, 2010 3:46 pm
by vincevg
Hi,
I'l trying to use PWM 0 to 7 on PIC 18F4331. Is it possible with FLocode 3 PWM module if not is it possible with C module and how to ?

Thank's

Re: PWM Pic 18F4331

Posted: Fri Jan 15, 2010 4:26 pm
by Benj
Hello

Using Flowcode's PWM component you can interface a maximum of 2 PWM channels.

We have examples of how to bit bang extra PWM channels if required. This is very simple to acheive using a timer interrupt.
http://www.matrixmultimedia.com/mmforum ... =26&t=6732

If you have to use the hardware PWM channels eg due to program restrictions then you will have to refer to the device datasheet and use C code in Flowcode to configure the remaining 6 channels. The datasheet chapter on PWM is quite long and drawn out so it might be worth printing out this section and having a good read and re-read to make sure you know how all the pieces fit together. This is how I generate component code for more complex devices anyway.