I would first look at using an inexpensive PIC with a high clock speed ( li= ke 64MHz) and just poll regular GPIOs and a single timer interrupt -- evalu= ate if that's fast enough for the application. You can debounce in firmwar= e and save at least a dozen components. 10K and 10nF have a tau of 100us, s= o if those values are realistic, polling at 10 kHz or 20 kHz might be fast = enough. If they are mechanical encoders that is more than fast enough...the= re is a limit to the count period set by the bounce time. I don't see how you can connect all A's to a single INT pin-- unless you ex= clusive OR'd each together, but that would require several gate chips and c= ould be pattern sensitive in terms of missing steps. Maybe it's a true 3D '= mouse' or a Stewart platform-- 6 DOF would be required for that. If the la= tter, the consequences of missing steps might be more serious. You might wa= nt to determine that, and whether multiple encoders will be moving at once. Best regards, --sp > On Dec 23, 2013, at 5:02 AM, CDB wrote: >=20 > I've been asked if I can conjure up a device that will allow 6 increment= al=20 > rotary encoders and 10 ADC inputs. I suspect this is for some sort of=20 > gaming doodad. >=20 > I'm wondering on what the lists thoughts are on saving 12 port pins with= =20 > the following. >=20 > Attach channel A of all the encoders to a single interrupt on change pin.= =20 > 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=20 > masked in a sequential series to see which pin changed and the state it=20 > changed to - Xoring with a previous state buffer to get direction and=20 > count. >=20 > Does this seem feasible and have I overlooked any pitfalls, other than=20 > 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=20 > per input. Pushbuttons on the encoders are not required, but the pins us= ed=20 > by an encoder could be substituted with push buttons, I was thinking of= =20 > having a Pic pin that could be set high or low to signal whether push=20 > buttons or encoders were attached. >=20 > It wouldn't surprise me if there wasn't a future requirement for the last= =20 > option to be set via a PC to the Pic. >=20 > Colin > -- > cdb, on 23/12/2013 >=20 >=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 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .