PDA

View Full Version : LED with Transistor



mimi_deviL
- 8th February 2008, 09:37
Hi guys... I am wondering how do we light up so many LEDs in one I/O pin. I have around 50 LEDs that need to be turned up which are controlled by PIC16F84A. So, I am thinking of putting a BC547C transistor as the switch. However, I am not sure about the connection and also the code. Does anybody can give me any suggestion?

I've attached my schematic. Thank you

skimask
- 8th February 2008, 14:29
Hi guys... I am wondering how do we light up so many LEDs in one I/O pin. I have around 50 LEDs that need to be turned up which are controlled by PIC16F84A. So, I am thinking of putting a BC547C transistor as the switch. However, I am not sure about the connection and also the code. Does anybody can give me any suggestion?
I've attached my schematic. Thank you

~1K resistor on the base...
Might want to put a series resistor inline with the LEDs, just as a precaution against shorts.
Better put a decent cap on the PIC's Vdd/Vss. $20 says when the PIC turns on all of those LEDs, it'll clobber the power supply for a split second and reset your PIC.

mimi_deviL
- 9th February 2008, 09:03
thanks a lot yeah! Now I got it