> Any other ideas or advice? I would try one loop that checks each shaft sensor in turn, updates the count if appropriate, and then wait until a next fixed point in time, use a timer for that. Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu