[AVR:] is a valid topic tag by the way http://www.piclist.com/#topics > The most likly cause of your problem is short term power loss > from intermitant connections to the track rails. (a few mS) If the cars are anything like the ones I used to have (Scalextric) those motors are excellent little noise generators. Snow on TVs for miles around. It's possible that EMF is resetting the AVR as well as the power supply dipping You might want to have a look and see if there are any caps on the motors. A 10nF ceramic from each terminal to the case (is it possible to ground the motor case ?) and 10nF across the terminals. And two zeners in series but opposite polarity --><--- across the terminals too. If you can use these small components inside the car to cut the noise down you might not need to use big ones like caps outside Ditto for what Denny said about isolating the AVR's power cap with a diode -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.