Page 1 of 1

P16F1704 PWM Component Not Working [Solved]

Posted: Sun Jan 28, 2018 6:29 pm
by QMESAR
Hi All.
I am having problems to get the PWM component on a PIC16F1704 to work in Flowcode.
I have configured the device with the MCC in MPLAB and the PWM runs perfectly attached the MPLAB project with the generated
configurations and the FC Flowchart for reference.
as you will see I have configured the PWM component in FC exactly as in MCC and there is no output from the PWM .
Here the output from MPLAB generatde hex file
1234.jpg
1234.jpg (87.6 KiB) Viewed 3815 times
The project files
Test.X.rar
(320.18 KiB) Downloaded 226 times
P1704.rar
(64.34 KiB) Downloaded 215 times
The FC configuration
1235.jpg
1235.jpg (54.33 KiB) Viewed 3815 times
Interesting is that the 1704 only has PWM channels 3 and 4 in HW, however Flowcode allows me to select Channel 1 -4 ,however the correct config is shown a above .my feeling is that the PPS is not set correctly for the Pins I might be wrong however it would be great if you guys could find the issue
and help out here.I also tried both setDuty and setDuty10bit no result

Please help :D

Re: P16F1704 PWM Component Not Working

Posted: Mon Jan 29, 2018 3:51 pm
by LeighM
Hi,
Could you try the attached updated FCD file.
Thanks
Leigh

Re: P16F1704 PWM Component Not Working

Posted: Mon Jan 29, 2018 4:21 pm
by QMESAR
Leigh,

Thank you I will give it a try :D I appreciate your help

Re: P16F1704 PWM Component Not Working

Posted: Mon Jan 29, 2018 4:38 pm
by QMESAR
Hi Leigh.

Thank you the PWM is now working fine :D :D
I apprecaite the quick fix!

Regards