Hi all,
I am trying to control various LEDs via PWM using a PIC16F1575.
I tried the CCS examples for PWM but the function used in it is not defined in this device. So I had a look at the 16f1575.h file and tried to figure it out. But so far no pulses showing.
I did run a basic blinking LED test to make sure the board is alive, all works well...
I am using CCS compiler Version 5.090.
Thanks for any help... See code attached below...
/****************************************************************************************/
/* END */
/****************************************************************************************/
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
Posted: Fri Dec 20, 2019 5:45 am
Your setup_pwm lines need quite a lot more parameters:
Currently you are not setting up the clock for the PWM....
The default for the clock selection will almost certainly be '11', which is
'reserved' and probably will not generate any clock.
Then you can't set 'period' less than 'duty'. Doing so will disable the PWM.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum