I am not 100% on this so ... If I am on the right track all you have to do is subtract 0.7 (the base - emitter voltage) from the 5 volts. This gives 4.3v. Then if you know the base current required for saturation say 5 mA This gives R = 4.3/0.005 = 860. So use a 1k resistor. I use these for pull ups, pull downs and preceding transistor bases. Dont forget to use a diode for spike protection. On 2/6/06, mrgizmo 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? > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist