On Sat, Sep 5, 2009 at 11:26 PM, Charles wrote: > The solution which eventually worked perfectly was to have the encoder set > either one of a pair of D flip flops (74HC74) depending on direction, this > generated an interrupt (port B on a PIC18F4620), the interrupt routine re= ads > the state of the flip flops (01 or 10 depending on direction) drives a 3rd > I/O line to reset the 7074 to a 00 state and re-enables interrupts. =A0Th= is > approach worked, did not generate false readings, and can get encoder info > very fast if that is required. The only downside is you need one extra I/O > line to reset the 7074. =A0As an aside port B also reads a 4x4 keypad usi= ng > interrupts, the 7074 outputs are coupled via an RC network to RB7 & RB6. Just so I'm clear, you were using the flip flops to debounce the encoder, not decode its direction, correct? Josh -- = A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist