CCP1 not effecting Port C values
Moderator: Benj
-
- Posts: 25
- Joined: Tue Sep 29, 2009 1:07 pm
- Has thanked: 1 time
CCP1 not effecting Port C values
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).
- Attachments
-
- Lathe.fcf
- (7.5 KiB) Downloaded 249 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: CCP1 not effecting Port C values
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.
I believe the Problem is within the run_pulse interrupt macro.
It is enabling the interrupt from within its own interrupt.
Try this version.
- Attachments
-
- Lathe.fcf
- (12 KiB) Downloaded 260 times
Martin
-
- Posts: 25
- Joined: Tue Sep 29, 2009 1:07 pm
- Has thanked: 1 time
Re: CCP1 not effecting Port C values
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.


- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: CCP1 not effecting Port C values
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 25
- Joined: Tue Sep 29, 2009 1:07 pm
- Has thanked: 1 time
Re: CCP1 not effecting Port C values
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
Kevin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: CCP1 not effecting Port C values
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.
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.
Martin
-
- Posts: 25
- Joined: Tue Sep 29, 2009 1:07 pm
- Has thanked: 1 time