Page 1 of 1
CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 3:53 pm
by kdoney34711
When I set pwm0 CCP1 or CCP2 with any duty cycle, the result does not effect the Port C values. This is a PIC18F4455 and CCP1 should be C2 and CCP2 should be C1. I am using the MIAC with Boostc++, no limits, after creating the program in Flowcode V4 (latest version).
Re: CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 4:55 pm
by medelec35
Hello kdoney34711.
I believe the Problem is within the run_pulse interrupt macro.
It is enabling the interrupt from within its own interrupt.
Try this version.
Re: CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 5:11 pm
by kdoney34711
I was trying to get the led to light up since it is connected to C2 and the CCP1 is C2 but it still isn't lighting.

Re: CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 5:20 pm
by Benj
Hello,
For the outputs to work you need to link the screw terminal signals M to V+. The MIAC unit is shipped with this connection already made.
This link is there to allow you to control what voltage the outputs are running at. The default with the link in place is the MIAC power supply voltage which should be around 12V.
Re: CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 5:49 pm
by kdoney34711
I was trying to test this is the simulator. I can't see what pwm gen's in the simulator? I was also trying this in the SourceBoost IDE using their plugins and I still don't see any 1's going to C.
Kevin
Re: CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 5:51 pm
by medelec35
I Tested the flowchart on my miac and it worked as it should.
When connected a wire to I8, then briefly touched on the V+ terminal, output A lit for 150ms, and PWM was observed on my scope for the same duration.
That was not the case with the flowchart you posted.
Re: CCP1 not effecting Port C values
Posted: Tue Feb 01, 2011 6:08 pm
by kdoney34711
OK, thanks. I'll just test it in reality.
Kevin