At 01:33 PM 12/24/2013, Bob Axtell wrote: > > > > The real bonus of off-loading the encoder tasks to a separate device > > is that the host is now much less busy because it doesn't have to > > deal with the rotary encoders. This can be a very worthwhile tradeoff. > >BUT the advantage of the PIC would be that you could advance the >counters INSIDE the PIC, offloading the entire task. > >--Bob Sure! You've described something that, with the addition of a glue=20 chip outside of the PIC (4- XOR gates), will handle 4=20 encoders. Because you can detect all 4 state changes, you can easily=20 implement the full 4X decoding. But how does he handle 6? My point was that if you have to add an external chip, do it in such=20 a fashion that it makes the job of the main controller easier in the long r= un. A small CPLD would handle 6, 8, 10 encoders easily - up to pin limit=20 of the package. You get edge detection on both encoder inputs and=20 implementing the full 4X decode with on-board logic (state machines)=20 is trivially easy. The only consideration is communications between the CPLD and the=20 host controller. As I mentioned earlier, both I2C and SPI are easily=20 done. Personally, I prefer SPI. But that's just me. dwayne --=20 Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax www.trinity-electronics.com Custom Electronics Design and Manufacturing --=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 .