Rigby-Jones, Michael [PAI01:4837:EXCH] wrote: > > Just had a request from someone for a PIC to decode the output of a rotary > encoder with quadrature output to a serial DAC. Done that. Scope the signals and see why they're not fit to use as interrupts. My rotor data sheet says the bounce is 3ms. At maximum rated rotation, the stable states are about this long! So I poll them every millisecond, and if they're the same for two consecutive samples I consider them stable and shift them into a software shift-register. If I see these stable values change, I interpret the transition. For thrift, the switches go straight into the CPU. I'd have preferred to do some signal conditioning with a pair of Schmitt triggers, to filter out most of the cak. This advice should save you a lot of wasted time!