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 26th August 2004, 07:08 AM   (permalink)
Default RGB LEDs with PWM??

Hey folks.I m a PiC newbie and I stumbled upon this great forum.I am trying to use a PIC16F877 cct to drive an RGB LED to morph 7 colours.U know like to fade from green>red>blue>...>white>green.. COOL!! (http://www.superbrightleds.com/TriColor%20LED.htm)

I found that the only way to do it seems to be using PWM. Cau u guys give me a lead on how to get started?The kit I have uses C or assy MPLAB(http://web.singnet.com.sg/~migadget/) Havent got much clue how to begin.. :?

Wuld really appreciate if I can get a clue from here.Thanks..!
seahkw is offline  
Old 26th August 2004, 11:06 AM   (permalink)
Default

PIC16F877, like all the other 28/40 pin PIC pkgs I know, have only 2 hardware PWMs. You will have to hack something together for the 3rd color. Fortunately, the rate doesn't have to be too high so the software solutions aren't too bad.

PIC16F877 is obsoleted by PIC16F877a, BTW. And the "a" is cheaper now.

Your pkg is a bit of overkill... 28 pin ones are easier to build with. But yes, it'll work fine.

The current listed on the LED specs is near the absolute max (not continuous) of 25mA for a PIC pin. Common anode would be better since the pulldown capabilities are a bit better than pullup. Take into account that the PIC pin output voltage will not be 0V when low, but will get pulled up to 1V or so under the heavy current. This will strongly affect your resistor sizes. Still, the best thing to do is add 3 external transistors to drive it.
Oznog is offline  
Old 27th August 2004, 02:30 AM   (permalink)
Default

Thanks Oznog! Yeah I do understand that the pkg is an overkill now.. I agree on the transistors part.. the floating 1V is definately an issue.Only thing now is how to hack the 3rd colour..Will try to think about it.
seahkw is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:26 PM.


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

eXTReMe Tracker