On Mon, Jun 10, 2013 at 5:12 PM, Mark Hanchey wrot= e: > On 6/9/2013 6:43 PM, Manu Abraham wrote: >> 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 ? > > > One thing I like to do if I don't have the free ports that are edge > changeable is using a small external PIC chip, you can get a 8 pin chip > that can handle multiple encoder and output the count on a single pin , > then check the count with your main chip whenever you have the free > cycles. The extra chip doesn't have to have edge detectors since the > rotary decoding is all it will be doing. > > The extra chip can keep the count for you and the main chip can then > check the status of a single pin, any pin you like using a one wire > based communication to get the current count. Yes very much true. But then you need to add in a communication interface at both sides. Making things complex again. I think I need to free up some PORTx pins and reorganize them a bit. Regards, 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 .