At 12:34 PM 2/5/2006 -0500, you wrote: > I am using a 2n3904 to drive a 12V relay off a 16F628 pic at 5V input, I'm >not sure how to figure out the resistor for the base? Assuming the coil current is under about 40mA nominal (>300 ohm coil), a base resistor of 1K or 2K should be okay. Use a better transistor if it's a higher current coil, switching a relay coil is actually rather hard on the transistor. Some automotive 12V types have VERY low resistance coils. A diode across the coil has been suggested, and is the simplest way of handling the coil inductance. A 1N4148 is fine for any relay you'd be likely to use. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist