Herbert, look in the PIC archives, there was someone who built a multi-channel decoder. You can write the code to just count while testing for the edge, after finding the rising edge of the servo pulse. You can also do it using a timer and interrupt on pin change. The tricky part is the analog feedback from the mechanics which requires an A/D. You can try the digital A/D approach but maybe better try to use a 16C711 which already has an A/D inside. An A/D is harder to make than a CCP ;-). Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads