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?
Thanks,
Dave.
PIC12F1840 PWM
Moderator: Benj
-
- Flowcode v5 User
- Posts: 104
- Joined: Fri Oct 10, 2014 11:15 am
- Has thanked: 27 times
- Been thanked: 22 times
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: PIC12F1840 PWM
Hi Dave,
Theis 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 6.1.4.0
If Flowcode is updated after the PIC_CAL_PWM.c fix then PWM will no longer work.
The
Code: Select all
clear_bit(trisa,2);
set_bit(t2con,2);
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 6.1.4.0
If Flowcode is updated after the PIC_CAL_PWM.c fix then PWM will no longer work.
Martin