> I know that you can use a ADC input and a series of resistors in place of > jumpers (if you are short on input pins). > > My questions are > * how many "jumpers" can you reliable read with a 10-bit ADC? > * can you use arbitrary bit patterns? > * suggestions for resistor values? > > Thanks, > Bil I've used a voltage divider driving momentary switches in to an ADC input to read switches. The signal was "looped through" the normally closed contacts of switches higher in the chain so closing more than one switch would not short stuff out (the switches were prioritized by their wiring). I've done this with 15 switches. Since this is one of 15 (plus none), it corresponds to 4 bits. I believe you could go a ways beyond this, though tolerances could cause problems. Use of a resistor network instead of individual resistors helps. For binary coding, you could use an R-2R network and have jumpers select between ground and Vref. I like for my designs to be able to report the board revision number. Now and then there's a firmware decision based on board revision, but it's usually just a "notify the user" thing so support knows what the customer has. I've done this with 0 ohm resistors setting a bit pattern on input pins. In my latest design, though, I just have a 10k pull up on an ADC input with room for various pull down resistors. As the board is revised, I'll put in different pull-down resistors and be able do determine the board revision by reading the ADC voltage. Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist