Timothy J. Weber replyed: Wild guess: When it's waiting for a button press at power-on, some timers are running. Once you start the first step, maybe timers and interrupts get synchronized for eternity, and if you're lucky it's in a good way that masks race conditions, and if you're not, you... lose the race. Can you look at a call tree and determine whether there could be a stack overflow during interrupt handling? Or are there other possible race conditions between main code and interrupts? Can you hack it to remove the button presses at power on, so that timing is standardized, and if so, does that change anything? -- Timothy J. Weber Russ then says: There are no intentional interrupts, interrupt routine is just a return. I have not done anything to intentionally enable or disable interrupts. I have stripped the code down to straight line thru it with not button presses, just some blinks then infinite loop of stepping: still erratic. Russ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist