See below... John Ferrell http://DixieNC.US john: you are right, my programming teacher at high school always scolded me for lazy indentation and scarce/non-existant commenting. when i'm working on the code i always think "there's no need for it, this is so simple and selfexplanatory!" but if i put it away for a couple of weeks and then look back at it not only i have a hard time figuring out what it does, but i could also swear that it wasn't me who wrote it :) Should i post code again in the future i promise it will be presented in a better form. *Most of the guys who really know the answers off the tops of their heads will not bother with looking at your code without reasonable formatting. I consider myself a "top down" programmer. I start by writing the comments and then I do the code. It works for me and my meat-memory is old enough to be on Medicare... maybe it is resetting for hardware causes? how should i check that? *All inputs should be tied either up, down or to a signal. The power supply should be bypassed at the chip. How do you know it is running? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist