Page 1 of 1

PIC18F45K80 PWM

Posted: Fri Dec 01, 2017 12:33 pm
by msahin1976
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?

Re: PIC18F45K80 PWM

Posted: Fri Dec 01, 2017 3:32 pm
by Benj
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.
18F45K80.fcdx
(32.83 KiB) Downloaded 318 times

Re: PIC18F45K80 PWM

Posted: Mon Dec 04, 2017 7:28 am
by msahin1976
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.

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 8:28 am
by msahin1976
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.
Hello Benj, how are you? I'm waiting for this issue. Would you please tell me if you see this message or not?

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 10:22 am
by LeighM
Hi,
Could you post your Flowcode project file (*.fcfx)
And just confirm that you are using Flowcode v6?
Thanks

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 11:21 am
by msahin1976
LeighM wrote:Hi,
Could you post your Flowcode project file (*.fcfx)
And just confirm that you are using Flowcode v6?
Thanks
Yes, we are using Flowcode v6. I attached the project file. There are two PWM output in this project.

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 11:40 am
by LeighM
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.

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 12:01 pm
by msahin1976
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."

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 12:10 pm
by LeighM
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?

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 12:20 pm
by msahin1976
After your message I totally removed the file and it is doing the same thing.

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 12:47 pm
by LeighM
Ah, thanks, now I see the issue, please replace attached component ...

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 1:26 pm
by msahin1976
Hi Benj. It is working. Thank you for your help. :D

Re: PIC18F45K80 PWM

Posted: Wed Dec 06, 2017 1:32 pm
by Benj
I assume you meant to be thanking Leigh :wink:

Thanks though I'm happy to take the credit :mrgreen: