So the answer appears to be the diode. When it's in parallel with the transistor as the book shows, it causes the latching behavior. When I put the diode in parallel with the solenoid, no more latching. So now I know what's wrong, but not why it does what it does. Can anyone explain why the transistor would stay on because of a path for current to get from E back to C? mystery half solved, darren -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist