>The RB4 pin is used to drive the base of a PN2222 transistor through a 2.2k >ohm resistor. The emitter is grounded and the collector is connected through >a 220 ohm resistor. Output is taken from the collector. Check the output pin spec, you'll find that the maximum low voltage is high enough to keep the base of an NPN active. Add an additional resistor from the base to ground, probably 2.2k or 4.7k, and the problem will dissapear. This has to be about the most common uC mistake. :) Low isn't Zero! That transistor only needs a couple microamps through the base to stay on. Also, once they heat up from being on, their own leakage and gain goes up!