Hi, What's the best way to decode a rotary encoder (gray code) output, when the outputs of the encoder are connected to edge detectors both of which result in an IRQ each ? (in a microcontroller, of course) (I have connected the decoder pins A&B to CCP1&2 of a PIC which result in 2 IRQ's (ie; CCP1 and CCP2) on each state change) Thanks, Manu --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .