PWM

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
jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

PWM

Post by jgu1 »

Hi in forum!

Is it possible to change the source code in Flowcode when doing PWM, or is Pin dedicated inside Pic. Ex. If I use a 16f876 I can see at a Scop it is portC Bit3. I've tried to look on the component of PWM in the flow code but have no opportunity to see or change anything. :?:

If it is not possible to move output, how is it possible to recognize the PWM output. (Initials on Pic)

Thank´s

JGU!

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: PWM

Post by medelec35 »

Hello jgu1
Using the PWM component macro within Flowcode:
If ndlx(Byte) = 1 then o/p will be from pin 13 (CCP1)
If ndlx(Byte) = 2 then o/p will be from pin 12 (CCP2)

CCP is an acronym for Capture, Compare, Pulse width modulation
Martin

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: PWM

Post by jgu1 »

Hi Medelec!

Ok, but ???? where do I change this? (I am a beginner).

Thank´s

Jgu1


NB. My Voltmeter still working. Splendid.

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: PWM

Post by Benj »

Hello Jgu,

The CCP peripherals are normally fixed and cannot be changed. This is the case for all 12, 16 and 18 series PIC devices. If you look on the chip diagram in Flowcode then you should see pins marked CCP1 and CCP2.

Some devices come with an alt PWM pin eg they have 2 CCP2 pins. To use the alternate pin rather then the default pin you have to tick to use the alt pin in the PWM component properties and you also have to change the appropriate setting in the device configuration.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times

Re: PWM

Post by jgu1 »

Hi!

Thank´s for your ansver.

OK, thath´s what I thougth. There are Pins wich is dedicated in flowcode for PWM, and these are CPP pin´s.

Regard

JGU1 :P

Post Reply