Good morning :
Why one component PWM with Flowcode : family PIC 16FXX and 18FXX accept several output PWM ?.
Thanks
Component PWM with several output PWM
Moderator: Benj
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Component PWM with several output PWM
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.
Martin
-
calimero88
- Posts: 19
- Joined: Fri Jul 27, 2007 2:56 pm
Re: Component PWM with several output PWM
Good morning
With 18F1330, it is 6 channels PWM: with flowcode one channel PWM ?
With 18F1330, it is 6 channels PWM: with flowcode one channel PWM ?
-
calimero88
- Posts: 19
- Joined: Fri Jul 27, 2007 2:56 pm
Re: Component PWM with several output PWM
Good morning
Test with flowcode 4 AVr and PIC : it is one component PWM , not several componet pWM.( Atmega 1280 or PIC 18F1330 )
Thanks
Test with flowcode 4 AVr and PIC : it is one component PWM , not several componet pWM.( Atmega 1280 or PIC 18F1330 )
Thanks
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Component PWM with several output PWM
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Component PWM with several output PWM
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.
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.
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Component PWM with several output PWM
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel