simple logic? 4 buttons, 5 states

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

shabtek

Well-known member
Joined
Jun 8, 2005
Messages
2,377
Location
midwest usa
Could someone point me in the direction of how to achieve this with basic logic chips; 4 inputs driving 5 outputs


A=0 0 0 0 0
B=1 1 0 0 1
C=1 1 1 0 0
D=0 1 0 1 1
 
I am seeing a couple possibilities, but other questions....

What should happen if TWO (or more) buttons are pressed at the same time?  IOW, does the logic require some sort of interlock?

If interlocked, then which button takes precedence?  If I press A and B at the same time, who wins?  B and C?  etc etc

 
whoa, thanks!
now to digest.

@B.R.: I don't need interlock...

For now I am using a 5p4t switch, not too into logic stuff but this is a simple enough task
 
shabtek said:
Could someone point me in the direction of how to achieve this with basic logic chips; 4 inputs driving 5 outputs


A=0 0 0 0 0
B=1 1 0 0 1
C=1 1 1 0 0
D=0 1 0 1 1

I'm glad you have answers already because I don't even understand your question.

A logic truth table for 4 inputs and 5 outputs will have far more possible combinations for input states, and then needs to show the 5 output states for each of those unique input states.

Obviously a micro could perform pretty much any obscure logic relationship you can imagine.

But it may be simpler.

JR
 
JohnRoberts said:
Obviously a micro could perform pretty much any obscure logic relationship you can imagine.

Its taken me a few years to wrap my head around this (having grown up with 74ACT type chips):  but microcontrollers have reduced in price and climbed in power to the point that there's not much use for discrete glue logic anymore, unless you are counting on picoseconds of latency (and who needs that for anything audio related?).

To the original poster:  I would investigate a PIC or a simple ARM-based microcontroller and indeed you can perform (and more importantly change and tweak!) the logic to your hearts content with simple software changes.  You could even trivially implement complicated hierarchal button priorities (like button C always takes precedence over button B, unless button A is pressed then button D takes precedence over button E, etc, etc).
 
Matador said:
JohnRoberts said:
Obviously a micro could perform pretty much any obscure logic relationship you can imagine.

Its taken me a few years to wrap my head around this (having grown up with 74ACT type chips):  but microcontrollers have reduced in price and climbed in power to the point that there's not much use for discrete glue logic anymore, unless you are counting on picoseconds of latency (and who needs that for anything audio related?).

To the original poster:  I would investigate a PIC or a simple ARM-based microcontroller and indeed you can perform (and more importantly change and tweak!) the logic to your hearts content with simple software changes.  You could even trivially implement complicated hierarchal button priorities (like button C always takes precedence over button B, unless button A is pressed then button D takes precedence over button E, etc, etc).

Amen... I'm an old analog dog with lots of discrete logic experience (includiing cmos logic in quasi analog apps)., but the ability for micros to perform non-linear decision making is incredibly powerful. I can't imagine not using a couple dollar micro for almost any thing worth doing these days.

once you add the micro, you can do even more tricks than just manage button pushes..

I used some old school 5v logic chips to latch LEDs in a meter design a few years ago, but since then have discovered dedicated driver chips that interface with the micros even better.  Modern micros run down at 3V or lower.

JR

 
now where is the face-palm emoticon?

thanks abbey!

already finished this w multi deck switch, but I knew there was a simple way.

I kind of regret not just getting a 6 deck switch, false economy with 6 relays from parts bin...complex and eats power
 
Thats why cave-men had the flat sloping forehead... from face palming themselves all day long...

facepalm.gif


JR

PS- Perhaps we should come up with some custom emoticons... I can think of some obvious ones that are missing.  ;D
 

Latest posts

Back
Top