Page 1 of 1

Component PWM with several output PWM

Posted: Sat Apr 17, 2010 3:31 pm
by calimero88
Good morning :

Why one component PWM with Flowcode : family PIC 16FXX and 18FXX accept several output PWM ?.

Thanks

Re: Component PWM with several output PWM

Posted: Sat Apr 17, 2010 4:59 pm
by medelec35
According to the data sheet, 16F88 and 18F1220 for example only has 1 PWM channel. It would be useful if you could post the full target please, So if there is an error I am sure it would be corrected.

Re: Component PWM with several output PWM

Posted: Sat Apr 17, 2010 11:22 pm
by calimero88
Good morning

With 18F1330, it is 6 channels PWM: with flowcode one channel PWM ?

Re: Component PWM with several output PWM

Posted: Sat Apr 17, 2010 11:28 pm
by calimero88
Good morning

Test with flowcode 4 AVr and PIC : it is one component PWM , not several componet pWM.( Atmega 1280 or PIC 18F1330 )

Thanks

Re: Component PWM with several output PWM

Posted: Mon Apr 19, 2010 12:43 pm
by Benj
Hello,

We currently limit the number of PWM channels to 2 due to complications that arise when trying to support more PWM channels. For example on your device with 6 channels if we allowed all 6 channels to be used then there would be no remining hardware timers for use in the application which could have knock on effects for peoples programs.

We hope to have a more inclusive PWM component for v5 of Flowcode but for now if you want to use more channels then are provided by the PWM component then you will need to use C code to configure the appropriate registers on the device. I have also released a timer based software bit banged PWM on the forum which allows any number of channels and may be useful to you.

Re: Component PWM with several output PWM

Posted: Mon Apr 19, 2010 1:03 pm
by medelec35
Hello Ben.
I believe the issue was only one PWM channel showing when there should have been the usual two showing, since example given (18F1330) was for a uc with multiple PWM channels.

Re: Component PWM with several output PWM

Posted: Mon Apr 19, 2010 2:24 pm
by Benj
Right I see the problem now. Thanks Medelec.

The 18F1230 and the 18F1330 devices do not have the standard PWM capture compare module CCP2. This means that the second PWM channel will not work with the standard PWM controller component code. As I say this is something we want to tackle for v5 of Flowcode.

In the mean time you should be able to use C code to control the registers that are responsible for the PWM to get the hardware up and running. If you are having problems getting this working then let me know.