Page 1 of 1

PWM component from basic i/o

Posted: Fri May 27, 2022 4:48 pm
by jan.didden
Q: does the PWM component in the basic i/o library use a timer from the target PIC?
I've seen some examples on line that mention the use of a timer.
I downloaded the example PWM_fader (attached) but it doesn't mention a timer. But maybe hidden.
(Can't run it as I have not yet purchased the basic i/o - in the process)
FC9, PICF1615355

Jan Didden

Re: PWM component from basic i/o

Posted: Fri May 27, 2022 5:18 pm
by medelec35
Hi Jan.
If you are not sure what pack to get to be able to use a component then all you need to do is find the component within Flowcode, e.g. using search, then select help for the component.
The required pack will be shown:
Required component pack.png
Required component pack.png (193.42 KiB) Viewed 965 times
Timers are used but you don't need to worry about any other pack apart from the one listed.

Alternatively, this link will show you want components are included in each pack

Re: PWM component from basic i/o

Posted: Fri May 27, 2022 7:27 pm
by jan.didden
Hi Martin,

No I wasn't worried about getting the right pack. I ordered the basic i/o, that has the PWM functionality.
But I was wondering if that PWM_fade routine used any of the timers of the PIC16F15355.
As you recall, there were some issues with timer - and IOC interrupts in my project, which were resolved thanks to you.
This PWM application is part of the same project and I just don't want to get into the same situation, hence my question if it uses a timer resource.
I thought that CCP (which is used for PWM) required a counter.

Edit: I think I answered my own question:
t1.PNG
t1.PNG (38.3 KiB) Viewed 960 times
Jan