ok- ill start over.
I have designed the circit for my project (a digital dashboard), once the design was completed, i had one spare pin on my pic - which can be used as analogue or digital.
my project requires 2 dip switches (or jumpers)
When i looked through my parts boxes i dicovered that i had 50 or so 8 way dip switches, so i thought id use them.
So i figured that if i could find a way of reading 6 dip swiches using one pin on the pic, then i would be able to use the 6 spare dip switches as options for future use (save me making new board - only need to re-burn pic).
I bought surplus stock, so i have boxes of resistors from ebay (all values), i had read a long time ago about how to read differnt values (binary) on 1 pin of a pic (using resistors). My first attempt was in the initial schematic on the other post. I was told that this wouldnt work, because there wasnt a dividong restistor (i think thats what was said), so i went away and googled, and found info on a 2/2R ladder.
I made the schematic (attached to the first post of this topic) from what i had seen on R/2R ladders, but Ron stated that i needed double throw dip switches (i dont have any of those)
I downloaded the simulator that was suggested (very good - thanks) still a lot to learn, but from what i found - i was only using half of the 5v range, eg all switches off = 0v at output, then after one switch went on it went to 2.5v (ish) then the other switches made it vary up to approx 5v. I was hoping for a wider sweep - all the way from 0v all switches off, to 5v all switches on, so that it was easier to pick out distinct switch settings.
I dont have room on my board for additional logic, so thats why i hoped to use only resistors.
If my simulation had produced the desired results for me (with double throw switches) then i would have just used jumpers instead of the double throw switches.
It didnt though, so i have just removed all 6 dip switches off my board and left the spare pin on the pic unconnected - as i need to get these boards made asap.
I would still love to know how to do this properly (read a bank of dip switches with 1 pin), but it will need to be for another project, as it is just adding complexity to this project, and still might not work.
hope you can assisst me, as you guys obviously know your stuff
thanks
graham