On Fri, 23 Oct 2009 17:35:51 -0500, "Paul & Lynn Tyrer" said: > A bit more information i have an old water meter that i have removed the > broken dial from the middle. Placed a hall effect switch in the cavity > and > have it flasheing an led everytime the cylinder turns. Every 50 turns > equals > 1 gallon. This helped me find a slow leak and fix it. So how about instead of dividing by 50 you just add 2 each time, and put a decimal place two digits over? That way you can read in 0.02 gallon increments. Even better, add 1 each time there is a change of switch state. You can display down to 0.01 gallon. The 1/50 gallon won't be evenly divided in two but it will help you spot leaks that much faster, and maybe the code will be easy since any routine needs to spot changes of state. Cheerful regards, Bob -- http://www.fastmail.fm - mmm... Fastmail... -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist