I had a little funny that took me an unpleasant while to find. If there's a little vibration or electrical noise, the count may creep a little without the encoder moving a full click. I had about 5 inches of cable, and a 512 count encoder. Seemed simple enough, so I just ran the two channels into the pins on the processor with 2.2k ohm pullups. After awhile, I found that I could move the encoder until I could see channel A change state, and rock it back and forth (without channel B moving). This shouldn't have incremented the position counter, but it was. I fixed it with a .01uF cap on each channel input at the encoder connector, and a lot smarter algorithem to move the position counters. (The code is in a PLD not a PIC... but the story would have been the same) I had the time and budget to get away without the HP interface chip. If I had better things to do, or production quantities were low enough I would have definatly dropped in a decoder chip. Joe -------------- >Phil, > >I would suggest that you don't do the quadrature decoding in the >PIC, but rather use on of the decoder chips from either Texas or >Hewlett Packard. I have a little circuit that transforms the quadrature signals into up and down pulses (just a pair of NAND gate if memory serves). Then I was going to drive the PIC interrupts with these up down (and reset) signals. Phil --------