Page 1 of 1

PWM Simulation

Posted: Fri Oct 30, 2015 2:34 pm
by Bachman
Hello!

PWM -> Properties -> Simulation -> Displayed Periods

Doesn't matter if it's 1, 2 or 3, the result always 1.

Re: PWM Simulation

Posted: Tue Nov 03, 2015 11:41 am
by Benj
Hello,

Thanks for letting us know. I have removed the property for now.

Please let me know if you think multiple periods is a good feature. If you think it is worth having then I will bring it back and make sure it functions correctly.

Re: PWM Simulation

Posted: Fri Nov 06, 2015 8:30 pm
by Bachman
Hello!

I think, one period is enough.

Re: PWM Simulation

Posted: Fri Dec 25, 2015 10:23 am
by Bachman
Hello!

I've dowloaded the new files from here: Flowcode 6 - latest components, bug fixes and improvements (Last update: 03/12/15). With the new files, the PWM component "Diplayed Periods" option gone, but two other bugs come out. With 100 % duty cycle, the blue line does't show. The biggest problem is, the PWM output on the HW always low, the pwm is not working (or always 0 % duty cycle). Test program is attached. I've compiled the program with the new files and with the old ones. As you can see, the checksum of the two result is different.

After found this, i've completly restored the "Flowcode 6" folder from a backup.
With-old-files.jpg
With-old-files.jpg (24.88 KiB) Viewed 7105 times
With-new-files.jpg
With-new-files.jpg (23.15 KiB) Viewed 7105 times

Re: PWM Simulation

Posted: Fri Dec 25, 2015 12:27 pm
by Bachman
The previous post born because of the original PWM component contain a big bug and i tried to solve it with the newest component. Setting the duty cycle to 255, does not set in the HW to 100 %, while in the simulation looks good. Used the test program from the previous post (1 sec 100 %, 1 sec 0 % Duty Cycle).

Tested on:
12F615
16F628A
18F1320
18F14K22
18F26K22

Tested with oscilloscope and a Logic Analayser, same results:
Logic.jpg
Logic.jpg (178.04 KiB) Viewed 7096 times
Logic_zoomed.jpg
Logic_zoomed.jpg (172.72 KiB) Viewed 7096 times

Re: PWM Simulation

Posted: Thu Mar 17, 2016 6:55 pm
by Benj
Hello,

Out of interest if you drop the "Period Overflow" property from 255 to 254 does this solve the problem?

We simply set the chip registers and leave it to get on with it so could be a limitation of the hardware?