Page 1 of 1

How: 7switch to 3digital output?

PostPosted: Thu May 17, 2012 1:30 am
by radians
hello, i need help. i have 7 switch. Each switch must give 3 digital output(3pin output). It is like this:
output
switch 1: 0 0 1
switch 2: 0 1 0
switch 3: 0 1 1
....
..
switch 7: 1 1 1

Let say i push the switch 3, then the output can give 011. only one switch can ON once a time.
i try to look at the demultiplexer. but it is like hard to do that.
So any idea on how to build that???

Re: How: 7switch to 3digital output?

PostPosted: Thu May 17, 2012 6:40 am
by ABSF
A decoder 74138 would do the opposite of what you wanted. So what you're looking is an encoder...

There are BCD to 7-segment, binary to BCD encoder but never heard of an 1 of 6 to BCD encoder. I'am afraid you'd have to construct your own using discrete TTL or CMOS gates. Something like this.

Let's call the 3 outputs x,y,z and the 7 switches s1 to s7.
x is high when s4-s7 is high
y is high when s2,s3,s6,s7 is high
z is high when s1,s3,s5,s7 is high.

encoder3.JPG


This example uses diodes and resistors. You can use multi-inputs and, or, nor, nand to do it if you want

Allen

Re: How: 7switch to 3digital output?

PostPosted: Thu May 17, 2012 11:44 am
by radians
thanks buddy!..it gives what i want.cool. but its seems need 12diodes and 10resistor and it make my cct bigger. is it any IC that i can use?? u just said can use gate. but how to do that??

Re: How: 7switch to 3digital output?

PostPosted: Thu May 17, 2012 12:46 pm
by ABSF
I gave you an example! The rest should be left as an exercise for you and your group. :mrgreen:

Allen

Re: How: 7switch to 3digital output?

PostPosted: Thu May 17, 2012 3:31 pm
by ABSF
Just found this TTL chip 74HC148 - 8_to_3_priority_encoder. This is the chip you're looking for. 8-)
Cytron only has the LS version.

IC-74LS-148 - IC 74LS148
http://www.cytron.com.my/viewProduct.ph ... %2074LS148

Allen

Re: How: 7switch to 3digital output?

PostPosted: Fri May 18, 2012 8:24 am
by radians
thanx man for the solution....this is the ic what i'm looking for. encoder, decimal to bcd. i just bought the 74hc147 cytron yesterday since i need to use cmos type. and i had try it. its working :D