Dear Andre, I used to build a datalogger for motorcycles. It measures speed, RPM and several analog channels too. When the revolution pulses keep away the RPM rate drops automatically. I extended the 16-bit timer to be able to measure low revs and speed. I just posted the code on the PIClist web site. It is the complete listing, including memory handling and communications and may therefore be a bit overwhelming. I suggest you have a look at the interrupt code first. The comments should help you on your way. Please have a look an= d see if you can use it: http://www.piclist.com/Techref/member/AT-planet-T9/datalogger.htm With kind regards, -Andries --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .