I am wondering, have anyone tested max speed for a polled program decoding an rotary encoder ? Would an interrupt driven program do better ? PIC16F877 @ 20 MHz. Approx 50 instuctions in the active loop Encoder is 100 pulses/rotation, quadrature decoding (400 flanks/rotation) I have reached around 2000-2500 rpm. 3000 rpm gives overspeed error. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads