So not to reinvent the wheel OR see a better way of doing it....is this cod= e out in the public domain somewhere? Dwayne Reid wrote: = There exists code that will measure an incoming pulse width with 3 = cycle resolution. That's 3 us resolution based on your mention of 4 = MHz clock frequency. The timer counter is max 19 bits but can be = shortened easily. In other words, you can measure a pulse of up to about 1.5 seconds = with 3 us resolution. dwayne -- = Dwayne Reid = Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 22 years of Engineering Innovation (1984 - 2006) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist = --------------------------------- Blab-away for as little as 1=A2/min. Make PC-to-Phone Calls using Yahoo! M= essenger with Voice. -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist