Hi, I've used rotary encoders from Bourne that have 64 transitions per rev. Why not use one of the 8 pin PICs to look after each encoder. Put them all on an i2c bus. Have the software calculate the delta change in the encoder since the last time the position was requested from the main controller. You could then have the master PIC request the encoder position from various encoders at different rates depending on it's importance, or expected frequency of use. In my application, the encoder was used to enter set points for a temp controller. I used an 16F84. One of the lines went to RA4. the RTCC was set to clock from this pin, and generate an interrupt on overflow. The counter was preloaded with 255. The interrupt is generated the moment the encoder line changes state. Note, Don't forget to debounce the encoder contacts. Regards, Peter. Peter Homann email: peterh@adacel.com.au Work : +61 3 8530-7755 Adacel Technologies Ltd Fax : +61 3 9596-2960 250 Bay St, Brighton 3186, VIC, AUSTRALIA Mobile : 041 4494578 http://www.adacel.com.au Australian Software Engineering Excellence > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Thomas Brandon > Sent: Monday, 13 September 1999 10:52 > To: PICLIST@MITVMA.MIT.EDU > Subject: [OT}Rotary Encoders (was Re: A/D Challenge) > > > I am investigating a similar project. The project is a MIDI > knob box. I will > start with 7bit accuracy but would like the ability to scale > up to 14bit > later. Currently I am considering an A\D converter (external) > and an analog > MUX. However digital knobs would be much better as: > 1) I don't have the conversion time overhead. > 2) I don't have to worry about an analog section and isolating it etc. > 3) No A\D accuracy problems (these would have been eased byt > the 7\14 bit > accuracies meaning I can dump LSBs > > However rotary encoders have the following problems: > 1) Dealing with multiple active knobs > While an analog pot holds a value indefinitely allowing > round robin > sampling a digital knob must be constantly monitored. As I > want up to 16 (if > not 32) knobs I need to MUX the knobs in some way. I could > use a priority > decoder but then I risk missing a turn. What I really need is > some hardware > handling the clicks and adding a knob address to a FIFO > buffer for the PIC > to deal with. But how would you wire this up to add the > address for a click > on the right line? Is there such a thing as an Encoder > without priority. > i.e. if requests come in on 2 lines it lets you deal with > both sequentially? > > 2) Accuracy > In 7bit data mode you would ideally be able to configure > it so 1 turn > (or thereabouts) gave the full 7bit range. This would require > 128 positions > per rotation. Digikey have a device with such accuracy but it > costs $51.37 > which is a little out of my price range to say the least. > Obviously I don't > need a full 128 positions as I can scale the value. But I > don't want to > scale it too much or smoothing of the values will become > neccesary. Anything > above 64CPR would be fine but a 64CPR knob is also $50. The > only knob within > my price range is a 24CPR knob at $5ea and even this is pushing it. > > Can anyone suggest a digital knob solution with a reasonable > cost and a > method of dealing with multiple active knobs. > > Tom. > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Jeff Barlow > Sent: Saturday, September 11, 1999 4:07 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: A/D Challenge > > > Why not just replace the pots with rotary encoders and get > rid of all the > analog stuff? >