Page 1 of 1

PWM

Posted: Thu Sep 16, 2010 5:20 am
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!

Re: PWM

Posted: Thu Sep 16, 2010 6:12 am
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

Re: PWM

Posted: Thu Sep 16, 2010 9:31 am
by jgu1
Hi Medelec!

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

Thank´s

Jgu1


NB. My Voltmeter still working. Splendid.

Re: PWM

Posted: Thu Sep 16, 2010 2:40 pm
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.

Re: PWM

Posted: Thu Sep 16, 2010 4:29 pm
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