CCP1 not effecting Port C values

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
kdoney34711
Posts: 25
Joined: Tue Sep 29, 2009 1:07 pm
Has thanked: 1 time

CCP1 not effecting Port C values

Post 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).
Attachments
Lathe.fcf
(7.5 KiB) Downloaded 249 times

medelec35
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

Post 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.
Attachments
Lathe.fcf
(12 KiB) Downloaded 260 times
Martin

kdoney34711
Posts: 25
Joined: Tue Sep 29, 2009 1:07 pm
Has thanked: 1 time

Re: CCP1 not effecting Port C values

Post 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.
:|

User avatar
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

Post 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.

kdoney34711
Posts: 25
Joined: Tue Sep 29, 2009 1:07 pm
Has thanked: 1 time

Re: CCP1 not effecting Port C values

Post 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

medelec35
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

Post 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.
Martin

kdoney34711
Posts: 25
Joined: Tue Sep 29, 2009 1:07 pm
Has thanked: 1 time

Re: CCP1 not effecting Port C values

Post by kdoney34711 »

OK, thanks. I'll just test it in reality.
Kevin

Post Reply