Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM lots of RGB LED's with a single PIC?

Status
Not open for further replies.

Spadez

New Member
Hi,

What is the best way of PWMing about 5-10 RGB LED's using a single 16f628A? I know the hardware PWM on is only a single pin which wont do for RGB and apparently its not great to use the software PWM because it cant do anything else in the background.

- James
 
Hi,

Every led will be the same colour. I'm not sure how many bits I need to be honest. Is that just how many colour variations I need?

I'll check out the link.
 
If every RGB LED will be the same colour, at the same time, then I happily use a 12v RGB LED strip, connected to 3 pins of a PIC (16F628a or 12F863) via something like a ULN2003AN and doing software PWM... which is not so bad, really.

If you do want all the LEDs to be different colours at different times, then that's a different problem, but one I'd be very much interested in hearing how you resolve...
 
Good Day,
I used the software PWM implementation method. I utilised 3 digital IO pins of the PIC to control 3 N-Channel MOSFETS. one per color. The Pic only controls the MOSFETs which are responsible for driving the Load of LED`s.

It has worked very well thus far, the only thing I found esential was to use a 20MHz crystal so that the PWM can have a decent refresh rate.

If you would like my HITECH C code as a guide please PM me.
 
Status
Not open for further replies.

Latest threads

Back
Top