Hay all you PIC lovers out there.
I have a small project on the go that requires dimming of leds.
Now. I have done this before using a pic on a computer case mod that had five leds that dimmed and changed could as required.
But I just created my own PWM via code. I didnt actually use the PIC PWM pins to do it.. mind you I think there was only 2 PWM pins.
Now it worked perfectly and wasnt really a big issue. But.. I did notice a visible flicker when the code was doing something more.. unique like all the leds had their own colour and they would slowly swap around.
So I started thinking of different options. Yes cleaning the code is high on my list (making it less bulky?) I guess.
But I though instead of using software create the pwm maybe I could use the pwm pin on the PIC.
So I have 6 channels plus 3 colour channels. My thought was to pulse the colour channel to control the brightness of the leds. And simply turn the led channel on or off.
So my first question is : which PIC would you guys and girls recommend using. All up I have 9 outputs for the leds 2 (maybe 3) for the inputs.
I did think I could use 1 pwm output to control the source to the colour channel array and then just switch the colour I needed on/off and adjust the pwm output.
This does increase the outputs for the leds to 10 however. But thats no biggy really.
What do you guys/girls think?
Also has anyone got any examples or links to good easy to understand circuit/programming pages to do with pwm. I have tried before to play with pwm to get a servo to work. That project died..
Thanks all for your time.
-Gr3mlin-
I have a small project on the go that requires dimming of leds.
Now. I have done this before using a pic on a computer case mod that had five leds that dimmed and changed could as required.
But I just created my own PWM via code. I didnt actually use the PIC PWM pins to do it.. mind you I think there was only 2 PWM pins.
Now it worked perfectly and wasnt really a big issue. But.. I did notice a visible flicker when the code was doing something more.. unique like all the leds had their own colour and they would slowly swap around.
So I started thinking of different options. Yes cleaning the code is high on my list (making it less bulky?) I guess.
But I though instead of using software create the pwm maybe I could use the pwm pin on the PIC.
So I have 6 channels plus 3 colour channels. My thought was to pulse the colour channel to control the brightness of the leds. And simply turn the led channel on or off.
So my first question is : which PIC would you guys and girls recommend using. All up I have 9 outputs for the leds 2 (maybe 3) for the inputs.
I did think I could use 1 pwm output to control the source to the colour channel array and then just switch the colour I needed on/off and adjust the pwm output.
This does increase the outputs for the leds to 10 however. But thats no biggy really.
What do you guys/girls think?
Also has anyone got any examples or links to good easy to understand circuit/programming pages to do with pwm. I have tried before to play with pwm to get a servo to work. That project died..
Thanks all for your time.
-Gr3mlin-