Connect the dip switch to a 74165 type shift register and stream the bits in via 3 lines.
Jerson
Connect the dip switch to a 74165 type shift register and stream the bits in via 3 lines.
Jerson
While that’s a great idea, and one I had considered, I don't have any lying around. Makes you wish Radio Shack still carried electronic parts.![]()
You could set this up as a voltage divider network and us the ADC to read the voltage.
By the time you work it all out though I bet you could have the shift register shipped to you![]()
Dave
Always wear safety glasses while programming.
Getting one shipped isn't the issue its the huge shipping charges. I could order a sample but it would be weeks before I see it.
BTW this is a 9 position dipswitch not 8.
Last edited by DynamoBen; - 8th October 2007 at 02:36.
This is not the same one Jerson recommended but should work.
http://www.allelectronics.com/cgi-bi...REGISTER_.html
$7.00 shipping ground no matter the size of order.
You said you have seven pins...register takes 8 inputs and uses three on the PIC. Now you have four left. Use one for the left over switch, now you have three pins left.BTW this is a 9 position dipswitch not 8.![]()
Dave
Always wear safety glasses while programming.
Sigh, let me make this more clear.
I'm not interested in ordering one part and paying $7 shipping. I'm trying to make this work with what I have because I'm under a very short timeline. If the switch matrix idea won't work then I will move onto my backup plan which will be hard programming the ID for now and dealing with the dipswitches later.
GOT IT
Try the ADC voltage divider. Even it all of the switches are on it will not matter.My only concern is unlike a keypad multiple switches may be on at one time.
Have the calculated values far enough apart that temperature variations will not cause an overlap and code for a plus or minus reading.
Dave
Always wear safety glasses while programming.
Bookmarks