> A couple of people asked me off-list what I meant. Attached > is a gif from my notes at the time. The opto and motor caps > were already built in to the ticket mechanism. It also had an > opto for the inter-ticket holes which the PIC used for counting I noticed the motor is used in one direction only but has no flyback diode around it. This may have been part of what was causing your glitches. The 100nF caps slow down and reduce the peak voltage of the flyback pulse, but I think the transistor is still taking a beating. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads