On Feb 25, 2010, at 10:06 AM, Jason Hsu wrote: > 2. Making the count variable local instead of global didn't solve > the problem. What about renaming the variable as well as making it local (using global variables for this sort of thing is ... bad.) As a general technique for debugging more obscure C problems, you can try running your program through the pre-processor only (it'd be -E on a standard unix-like compiler. YMMV.) Looking at the pre-processed output can be ... very educational. BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist