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.

RGb LED Controller

Status
Not open for further replies.

wcavanagh

New Member
I wonder if someone can help a poor man. I want to colour cycle a RGB LED smoothly through thounds of colours, it will be used to light up a lod etched in glass, so random colours would be great. I have been told PWM is what i need, I have a PICKit1 and a PicstarPlus programmer from Microchip. I am very new to this and just dont know where to start, I have some PIC12F675 Chips. Anyone recomend anything? PLEASE.......
 

Rescyou

New Member
Questions

What language are you programming in and what speed are you going to run the 675 at?

Resc.
 

wcavanagh

New Member
Going to use ASM as that seems to be all i can do with MPLAB, going to use the internal 4Meg clock
 

Rescyou

New Member
Info

4mhz will work for 3-channels ok if you use the correct methods for pwm, as for ASM I can't help you on that.

Resc.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Re: Info

Rescyou said:
4mhz will work for 3-channels ok if you use the correct methods for pwm, as for ASM I can't help you on that.

Resc.

If he's got the PICKit1 (as he said), it comes with a Lite version of a C compiler - if that helps?.
 

TheAnimus

New Member
the best way would be to use a TMR0 interupt, then devide it down depending on what value you should have in a file register for each LED.

The TMR0 registrer at 4mhz u might want to use as a global biasing, at the end of the ISR add a value to the TMR0 register.

Thats a pritty rough outline, but it should work fine, you might find a lot of tweaking is needed to get nice linear values (odds are PWM won't provide a smooth change of light intensity with standard linear values)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Top