>I just feed one signal into portb,0 interrupt. When the interrupt >occurs I check the state of the other signal, if its high increment >the angle register and if low decrement it. Or vice versa depending >on the required direction. > >Paul Waterfield >Exhibit designer >Techniquest >Stuart Street >Cardiff CF1 6BW >UK >T +44 (0) 1222 475 475 >F +44 (0) 1222 482 517 > I have used this approach for encoder used in a satellite antenna to read azimut angle. Got problems with some false pulses which occured when the encoder is just giving pulses when stopped (wind movement). When this pulses are in the output connected to the interrupt you will get a false count. A friend in Canada solved the problem using a new chip. This are his comments: I have located an 8 PIN device from US Digital that will allow one (1) count for each pair quadrature pulses in put. This device also output directional pulse for each quad pair input. This device now eliminates false counting. Also I can by placing PIN 6 high (true) generate 4 output pulses for each pair quad input, plus diirectional pulse. This now allow anyone with low quadrature counts to increase his counts by four times. This device works very, very well and only cost approx. $5.00US each. So, this now allow the best of both worlds, and still allow "true" quadrature counting and no "false counting. This way I can leave the "code" as it is and everyone is happy, because it is now more versatile and allow much flexibility. Some of the guys are trying to use as few as 9,000 counts for 180deg. This device now allow him to use 36,000 counts........very nice. This device has no output unless it receives both of the quadrature pulses with 90deg phase shift. Will ask him for more details about part number and company address, phone or e-mail. Luis Fernandez Cormenzana RadioBit Sistemas, S.L. Vehicle fleet control systems Patrol presence controllers Fax/Tel:+34-6-585 64 57 e-mail: radiobit@dragonet.es http://www.dragonet.es/users/radiobit