How: 7switch to 3digital output?

Discussion about project that uses other controller, or non controller based project such as using logic gates, FPGA, ARM, Mechanical ....etc. Welcome to post it here

How: 7switch to 3digital output?

Postby radians » Thu May 17, 2012 1:30 am

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???
radians
Freshie
 
Posts: 4
Joined: Thu May 17, 2012 1:04 am

Re: How: 7switch to 3digital output?

Postby ABSF » Thu May 17, 2012 6:40 am

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
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: How: 7switch to 3digital output?

Postby radians » Thu May 17, 2012 11:44 am

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??
radians
Freshie
 
Posts: 4
Joined: Thu May 17, 2012 1:04 am

Re: How: 7switch to 3digital output?

Postby ABSF » Thu May 17, 2012 12:46 pm

I gave you an example! The rest should be left as an exercise for you and your group. :mrgreen:

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: How: 7switch to 3digital output?

Postby ABSF » Thu May 17, 2012 3:31 pm

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
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: How: 7switch to 3digital output?

Postby radians » Fri May 18, 2012 8:24 am

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
radians
Freshie
 
Posts: 4
Joined: Thu May 17, 2012 1:04 am


Return to Misc Project

Who is online

Users browsing this forum: No registered users and 5 guests

cron