PWM Conponent

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

Post Reply
Ralph
Posts: 18
Joined: Tue Mar 04, 2008 11:32 pm
Contact:

PWM Conponent

Post by Ralph »

Do you have any working Flowcode examples using the PWM Component? I am having trouble getting it to work and seeing an example may be the best solution.
Thank you,
Ralph

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 Conponent

Post by Benj »

Hello Ralph

There are examples on our Flowcode examples page.
This can be found by going into the download section of our website.

Ralph
Posts: 18
Joined: Tue Mar 04, 2008 11:32 pm
Contact:

Re: PWM Conponent

Post by Ralph »

Thanks, I found it.
One other question; Since the PWM component is an internal component, how can I direct the PWM output to an output port?
Ralph

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 Conponent

Post by Benj »

Hello Ralph

PWM is a hardware driven function with specific output pins. Therefore you cannot choose which pins to send the PWM signal to. The dedicated PWM output pins are marked as CCP1 and CCP2 on the chip diagram. These refer to the PWM index values of 1 or 2 used within Flowcode. The chip diagram can be made visible by clicking on View -> Chip.

If you require control of a specific I/O pin or more then 2 channels then it may be better to use a timer interrupt or a software loop with output icons to manually switch the output high or low.

Post Reply