I would look at using chips with the QEI peripheral in them to handle at le= ast some of the quadrature encoders. IIRC there are PIC24/33 chips that wil= l handle either 2 or 4 QEI ports, and the 100 pin versions of these chips h= ave zillions of ADC lines. Check the PIC24E/PIC33E series as a starting point - but whichever chips yo= u look at, check the errata, I know some chip families have errors in the Q= EI. >=20 > I've been asked if I can conjure up a device that will allow 6 increment= al > rotary encoders and 10 ADC inputs. I suspect this is for some sort of gam= ing > doodad. >=20 > I'm wondering on what the lists thoughts are on saving 12 port pins with = the > following. >=20 > Attach channel A of all the encoders to a single interrupt on change pin. > The IOC will look for high to low and then low to high. >=20 > Attach all the B channels to individual pins on a port. >=20 > On interrupt the complete port with 6 channel B's will be read in and mas= ked > in a sequential series to see which pin changed and the state it changed = to - > Xoring with a previous state buffer to get direction and count. >=20 > Does this seem feasible and have I overlooked any pitfalls, other than > possibly more than one encoder being twiddled at the same time? >=20 > I would debounce in hardware with probably a 10K pullup and 10nF capacito= r > per input. Pushbuttons on the encoders are not required, but the pins us= ed > by an encoder could be substituted with push buttons, I was thinking of > having a Pic pin that could be set high or low to signal whether push but= tons > or encoders were attached. >=20 > It wouldn't surprise me if there wasn't a future requirement for the last > option to be set via a PC to the Pic. >=20 > Colin > -- > cdb, on 23/12/2013 >=20 >=20 >=20 >=20 >=20 >=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 --=20 Scanned by iCritical. --=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 .