PIC18F45K80 PWM
Moderator: Benj
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
PIC18F45K80 PWM
I need to use two PWM output in PIC18F45K80 at the same time. In the datasheet it seems that I can use Timer 2 or Timer4 as PWM timer. So I can make it. But Flowcode only allows Timer 2. I can’t use the second pwm output. Is this normal or can I fix it?
- 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: PIC18F45K80 PWM
Hello,
Please can you try this updated definition file and see how you get on.
Simply copy to your "Flowcode 6/FCD/PIC" folder and then restart Flowcode.
Please can you try this updated definition file and see how you get on.
Simply copy to your "Flowcode 6/FCD/PIC" folder and then restart Flowcode.
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
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: PIC18F45K80 PWM
Dear Benj,
Thank you for your fast answer. Now it is allowing to select the other timers to use for PWM. But now when I try to compile, it is showing an error as "Illegal redefinition of symbol: MX_PWM_PERIOD". It doesn't allow me to use it.
Thank you for your fast answer. Now it is allowing to select the other timers to use for PWM. But now when I try to compile, it is showing an error as "Illegal redefinition of symbol: MX_PWM_PERIOD". It doesn't allow me to use it.
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: PIC18F45K80 PWM
Hello Benj, how are you? I'm waiting for this issue. Would you please tell me if you see this message or not?msahin1976 wrote:Dear Benj,
Thank you for your fast answer. Now it is allowing to select the other timers to use for PWM. But now when I try to compile, it is showing an error as "Illegal redefinition of symbol: MX_PWM_PERIOD". It doesn't allow me to use it.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F45K80 PWM
Hi,
Could you post your Flowcode project file (*.fcfx)
And just confirm that you are using Flowcode v6?
Thanks
Could you post your Flowcode project file (*.fcfx)
And just confirm that you are using Flowcode v6?
Thanks
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: PIC18F45K80 PWM
Yes, we are using Flowcode v6. I attached the project file. There are two PWM output in this project.LeighM wrote:Hi,
Could you post your Flowcode project file (*.fcfx)
And just confirm that you are using Flowcode v6?
Thanks
- Attachments
-
- LCD controller.fcfx
- (278.71 KiB) Downloaded 232 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F45K80 PWM
Thanks for the file.
It compiles OK for me.
Attached is latest PWM component, perhaps you have an older one, just drop this into your Flowcode 6 installation components directory,
and re-start Flowcode.
It compiles OK for me.
Attached is latest PWM component, perhaps you have an older one, just drop this into your Flowcode 6 installation components directory,
and re-start Flowcode.
- Attachments
-
- PWM.fcpx
- (7.82 KiB) Downloaded 219 times
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: PIC18F45K80 PWM
Nothing changed. Flowcode v6 is giving the same error. Also, I checked Flowcode 6 version.
"Your current version is: 6.1.4
Your version of Flowcode6 is up to date."
"Your current version is: 6.1.4
Your version of Flowcode6 is up to date."
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F45K80 PWM
Did you replace the component? Or move the old one to another directory?
If you just rename the old one it could still be used by Flowcode.
Could you send your LCD Controller.c file?
If you just rename the old one it could still be used by Flowcode.
Could you send your LCD Controller.c file?
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
Re: PIC18F45K80 PWM
After your message I totally removed the file and it is doing the same thing.
- Attachments
-
- LCD controller.c
- (233.36 KiB) Downloaded 202 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC18F45K80 PWM
Ah, thanks, now I see the issue, please replace attached component ...
- Attachments
-
- cal_pwm.fcpx
- (8.22 KiB) Downloaded 215 times
-
- Posts: 18
- Joined: Tue Aug 23, 2016 8:03 am
- Has thanked: 3 times
- Been thanked: 2 times
- Contact:
- 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: PIC18F45K80 PWM
I assume you meant to be thanking Leigh
Thanks though I'm happy to take the credit
Thanks though I'm happy to take the credit
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