P16F1704 PWM Component Not Working [Solved]

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

P16F1704 PWM Component Not Working [Solved]

Post 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 3198 times
The project files
Test.X.rar
(320.18 KiB) Downloaded 191 times
P1704.rar
(64.34 KiB) Downloaded 178 times
The FC configuration
1235.jpg
1235.jpg (54.33 KiB) Viewed 3198 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: P16F1704 PWM Component Not Working

Post by LeighM »

Hi,
Could you try the attached updated FCD file.
Thanks
Leigh
Attachments
16F1704.fcdx
(23.1 KiB) Downloaded 187 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: P16F1704 PWM Component Not Working

Post by QMESAR »

Leigh,

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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: P16F1704 PWM Component Not Working

Post by QMESAR »

Hi Leigh.

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

Regards

Post Reply