Logic with TTL gates

Thread Starter

melmac82

Joined Jul 18, 2009
9
I have been racking my brain for almost a week now and seem to be getting nowhere.

I need to design a part of a logic circuit that does the following:

There are 5 inputs (A, B, C, D, E) and 5 outputs (a, b, c, d, e)
A goes high, a goes high; B goes high, b goes high, etc...

However, there is a twist.

No matter what any of the other inputs are, the last input to go high produces a high on its output and ONLY its output.
For example C is made high so c is high, then B goes high (with C still high) causing b to go high and c to go low. Then if D goes high (with B and C still high) d goes high and both b and c are low.

This is easy when it goes in order, but the problem I am running into is that when I mix things up and randomly select and deselect inputs every circuit that I have built so far causes oscillations.

Is there a way to do this? The closest I have gotten is when I use XOR gates or latch combinations. So any ideas on what to possibly use to make this work?
 

RiJoRI

Joined Aug 15, 2007
536
Look at the station selector switches on your car radio. Dunno if they are currently using micros, but my Dad's '49 Plymouth sure didn't! :D

THis is an interesting problem....

--Rich

What you need to do is trap the rising edge of the active button, while ignoring the steady-state buttons.
What if the signals are OR'd together to trip a timer chip, and each signal passes through a cap with a bleed-off resistor to ground after it. The spike is fed into a latch, which is gated from the timer. Depending on the inter-switch timing, you may be able to do it that way.

--RR
 
Last edited:

DC_Kid

Joined Feb 25, 2008
1,072
i would think that for any input, its output serves as the reset for the others.

as example:

you press A 'a' goes high causing a reset on B C D E
you then press B 'b' goes high causing a reset on A C D E
etc

some latches that have resets seems should get the job done?
 

Thread Starter

melmac82

Joined Jul 18, 2009
9
I think I left out a couple of things in the first post... the circuit is an analog circuit and I don't have a clock signal to use with flip-flops. (At least all of the flip-flops that I have dealt with use a clock.) Also, the switches for each input are manual (like a light switch).

I've had ideas about sending the signal from the switch to the S input of an RS latch with the signals from the other switches going to the Reset through a diode. Then I have problems because there would be an unstable condition on the latch, so I have to turn off the signal from the switch even if the switch is still engaged. (Haven't figured out how to do this yet though) Am I thinking in the right direction?
 

KL7AJ

Joined Nov 4, 2008
2,229
Look at the station selector switches on your car radio. Dunno if they are currently using micros, but my Dad's '49 Plymouth sure didn't! :D

THis is an interesting problem....

--Rich

What you need to do is trap the rising edge of the active button, while ignoring the steady-state buttons.
What if the signals are OR'd together to trip a timer chip, and each signal passes through a cap with a bleed-off resistor to ground after it. The spike is fed into a latch, which is gated from the timer. Depending on the inter-switch timing, you may be able to do it that way.

--RR

Ever seen the selector bars on a Model 28 teleprinter? YIKES! :D
 

RiJoRI

Joined Aug 15, 2007
536
Anyone else have any ideas?
I fooled with the problem using Liberty BASIC, and got the following. Attached is a possible implementation with TTL logic. Note that the lines are actually 3-line buses, which should be expanded to 5.

--Rich
Rich (BB code):
' This assumes only one switch closure at a time.
'  Multiple simultaneous switch closures are
'  rare in the real world.

[Start]
' Replace this with hardware read
    do
        input InSw
    loop until InSw <> History

    
' See which switch changed
    ChgSw = InSw xor History

' Save Input Switches    
    History = InSw

' Light only for the changed switch
    ChgSw2 = ChgSw and InSw


    if ChgSw2 > 0 then
        OldSw = ChgSw2
    end if
    gosub [ShowSw]

    goto [Start]

[ShowSw]
    if OldSw AND 4 then
        print "1";
    else
        print "0";
    end if
    
    if OldSw AND 2 then
        print "1";
    else
        print "0";
    end if
    
    if OldSw AND 1 then
        print "1";
    else
        print "0";
    end if
    print ""
    return
 

Attachments

Top