PIC12F1840 PWM

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Dave Squibb
Flowcode v5 User
Posts: 97
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times

PIC12F1840 PWM

Postby Dave Squibb » Sun Aug 12, 2018 4:22 pm

Hello all,
The attached program works with a PIC16F88 but I can't get it to work on a PIC12F1840.
Porta,1 goes high so the oscillator is working. I've tried clearing trisa,2, the CCP1 pin and setting t2con,2 to turn on timer 2.
Could someone have a look please?

(9.16 KiB) Downloaded 103 times

User avatar
Valued Contributor
Valued Contributor
Posts: 8604
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2476 times
Been thanked: 3558 times

Re: PIC12F1840 PWM

Postby medelec35 » Sun Aug 12, 2018 6:35 pm

Hi Dave,

Code: Select all

is not required for PWM to work.
I have tested your flowchart with and without the above C code and PWM is present on pin 5.
Have you applied the FC6 fix found here?
You should make sure FC6 is updated with the latest version then apply fix after.
The version I'm running is
If Flowcode is updated after the PIC_CAL_PWM.c fix then PWM will no longer work.
These users thanked the author medelec35 for the post:
Dave Squibb (Mon Aug 13, 2018 1:41 pm)
Rating: 5%

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.