PIC24EP512GU810 PWM problems

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Contact:

PIC24EP512GU810 PWM problems

Post by electronix »

Hi all.
I have been trying to use a PWM component in a project but no matter what I put in the duty cycle it always stays 50%, Has anyone else experienced the same thing or am I missing something?
Have tried both 10-bit setting and 8-bit setting and the result stays the same...50%

Regards

Nick

User avatar
Benj
Matrix Staff
Posts: 14848
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: PIC24EP512GU810 PWM problems

Post by Benj »

Hi Nick,

Please can you post your project file so we can see what you're doing and hopefully suggest a fix.

Also is the problem limited to hardware or simulation or both?

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Contact:

Re: PIC24EP512GU810 PWM problems

Post by electronix »

Hi Ben.
Thanks a lot for looking into it, maybe I´m just not seeing the problem.

I have tried it on hardware.
Here´s the file

Best Regards
Nick
Attachments
24EP512GU810_PWM.fcfx
(18.64 KiB) Downloaded 75 times

User avatar
Benj
Matrix Staff
Posts: 14848
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: PIC24EP512GU810 PWM problems

Post by Benj »

Hi Nick,

I think I see what's going wrong.

When you enable the PWM it will automatically jump back to the period and prescaler values from the properties.

So if you change the period and or prescaler before enabling the PWM output then these changes will be lost.

I would recommend enabling the PWM and then calling the ChangePeriod and SetDutyCycle10Bit macros and seeing how you get on.

If this still has issues then are you running 7.3 and have you applied the latest post 7.3 updates from here.
viewtopic.php?f=63&t=19743

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Contact:

Re: PIC24EP512GU810 PWM problems

Post by electronix »

Hi Ben.
:oops: :shock: ....
I cant belive I just didn´t see that :oops:

Thank you for, as always, excellent support Ben :D

Best Regards
Nick

Post Reply