8 switches to binary

Thread Starter

Sparksvonrou

Joined Feb 21, 2011
1
I need to be able to select 1 of 8 switches numbered 1 to 8 and get the result out of a chip in binary form. I am not worried about errors from multiple switches accidentally being on at the moment.
Thanks
Sparks
 

beenthere

Joined Apr 20, 2004
15,819
If all the contacts of a DIP switch go to ground, and the lines on the other side are pulled up to Vcc, the switch output will be in binary, and readable as such. Binary states are 0 & 1 (low and high).
 

Commander#1

Joined Jan 22, 2011
14
I need to be able to select 1 of 8 switches numbered 1 to 8 and get the result out of a chip in binary form. I am not worried about errors from multiple switches accidentally being on at the moment.
Thanks
Sparks
Hello, Sparks -
What you are looking for is called an 8-line-to-3-line Priority Encoder, TTL #74LS148. It is expandable e.i. 16-line-to-4-line
encoder (using 2 chips). In the case of more than one switch being on at the same time, it will process only the highest
numbered switch. I just checked the Jameco catalog (www.Jameco.com) #111, pg. 5 and it's in stock @$.95/ea. While
you're at, you may want to also order from Jameco the "TTL Logic Data Book" by Texas Instruments. It'll show you how
to hook everything up (plus a WHOLE lot more!!!!). I go this reference quite often - along with Don Lancaster's "TTL Cook-
book". I hope this answers your question adequately.

Phil.

:)eek: The world is - OH MY GOSH -- round!!! :eek:)
 
Top