Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 9th January 2004, 12:12 PM   (permalink)
Default RGb LED Controller

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.......
__________________
-------
Regards,
William Cavanagh
wcavanagh is offline  
Old 9th January 2004, 02:41 PM   (permalink)
Default Questions

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

Resc.
Rescyou is offline  
Old 9th January 2004, 02:51 PM   (permalink)
Default

Going to use ASM as that seems to be all i can do with MPLAB, going to use the internal 4Meg clock
__________________
-------
Regards,
William Cavanagh
wcavanagh is offline  
Old 9th January 2004, 03:20 PM   (permalink)
Default 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.
Rescyou is offline  
Old 9th January 2004, 03:37 PM   (permalink)
Default Re: Info

Quote:
Originally Posted by Rescyou
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?.
Nigel Goodwin is offline  
Old 9th January 2004, 09:57 PM   (permalink)
Default

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)
TheAnimus is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:39 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker