Its noise from the motor and the pickups that is causing it to reset. A few years ago I was designing a decoder for the Marklin-Motorola protocol and found that the PICs were a bit more noise immune than the AVRs. Also because of the noise a 7805 almost never worked. But a zener in series with a resistor and a cap across the zener for filtering worked without a problem. But in my case the supply voltage on the track was more or less constant. Happy Holidays. Shahid -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body