Page 1 of 1

PWM max duty not working

Posted: Thu Nov 23, 2017 8:09 am
by wahid
hope every one will be fine.
flowcode 6, pic161937
For simplicity and to understand duty cycle behaviour I have created very simple code.
In my code I have set max duty 4. The code works for 1,2,3 but not for max duty 4.
can't understand why and how to get max duty cycle working.

Re: PWM max duty not working

Posted: Thu Nov 23, 2017 2:52 pm
by medelec35
Hi wahid,
If you're referring to the simulation, then it's just a bug with the graphics!
Look at the duty value, it shows 100% when set with 4.

If you're interested, you can select

Code: Select all

SetDutyCycle10Bit 
then you can have x4 resolution.
So 16 = 100% duty

I have move your posts to the V6 Bugs section.

Martin

Re: PWM max duty not working

Posted: Fri Nov 24, 2017 12:21 pm
by wahid
Thanks medelec35 and hope that later versions of flowcode will be free from such bugs.