At 08:49 AM 12/21/2011, you wrote: >A simple question about transistor switches: > >I am using NPN transistors to drive several RGB LEDs (in parallel), >with the base current being provided by PWM signals from a PIC. >However, my LEDs are common cathode. It seems that all the diagrams I >see around the internet about transistor switches (e.g. >http://www.kpsec.freeuk.com/trancirc.htm#switching) and driving LEDs >with transistors show the load, including the LED, on the collector >side of the transistor. However, I need to put the LED (anode) on the >emitter side since the cathode is common. > >So, I have put the current limiting resistor on the collector, and the >LED anode on the emitter. This works fine on the breadboard, and >based on my very limited knowledge of transistor function I see no >reason not to do it this way. My question, then, is whether there is >some something about this configuration that is not advisable that I >am missing? > >-Eric Using an inverted input drive (low =3D ON) and a PNP transistor (emitter to Vdd, base through resistor to input drive, collector through current limiti= ng resistor(s) to the LED(s)) will work, and the transistor will run much cooler. This is also superior for high currents because the PIC can sink the base current better than it can source it, and the current will be better controlled for high Vf LEDs such as blue, assuming a 5V supply. If you use emitter-follower drive there is also a subtle potential gotcha in that there is a possibility of oscillation at VHF frequency.. usually the PIC has a high enough output Z that won't happen, but without a base resistor (which gets you back to the same parts count) it is hard to rule out. There are plenty of really, really good p-channel MOSFETs that can switch a lot of current in an SOT-23, SO-8 etc. - so that's another possibility. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the rewar= d" speff@interlog.com Info for manufacturers: http://www.trexon.co= m Embedded software/hardware/analog Info for designers: http://www.speff.co= m --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .