On Tue, Jun 11, 2013 at 3:21 AM, Mark Hanchey wrot= e: > On 6/10/2013 4:58 PM, Barry Gershenfeld wrote: >> I see that Mark already suggested a one-wire system to do this. I'm awar= e >> of one-wire systems like the one Dallas Semi used, but I might not want= to >> piggyback another project onto a current one. The old serial mice actua= lly >> were a single-wire (RS-232) setup as well, so there's a proven way. Now >> you'd have a UART to deal with. I also sense that as you add wires to = the >> interface, the time required to get the information goes down. >> > > It doesn't need a UART or a complicated protocol. Bit banging can > easily be used to send the info to any device that has at least 1 pin > without using a UART. Stream the same information from the encoder chip > over and over using a long pulse for the start of where your main chip > would start processing the message. > Advantage of this is you can use multiple rotary encoders and only use 1 > pin on the main chip for all the encoders and the main chip doesn't > have to use an interrupt , it can read it whenever it has free cycles. The whole idea of bitbanging, polling etc is useless in this context: I could've used a Timer and polled the encoder pins (only a single encoder is used), but then the system cannot be taxed to do additional polling, as I wrote originally, it is doing quite some other work too.. The point is to use a single encoder with an 18F4550 using the bare minimal resources (now, that I have freed up pins, so RB change interrupt is also possible), while the decoded results provide quite good results. It= is as simple as that. The conceptt of adding separate chips and additional microcontrollers are pointless. In the old days, when computing power was very limited, it was acceptable to add chips for each and everything, but in the new world, most likely you can pack some of the features that you find in dedicated chips, directly into a micro, which has some free resources that can be used for an additional functionality. Yes, we can keep on adding hardware more and more, but that is not an effecient way of doing things. Isn't it ? 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 .