Maker Pro
Maker Pro

Two outputs under logic control?

M

mike

Terry said:
I've been scribbling in vain for an hour and still haven't solved
this. Could someone point me in the right direction please? I want to
get an input pulse A passed to one of two outputs 1 or 2, depending on
the state of input B. Like this:
http://www.terrypin.dial.pipex.com/Images/Logic1.gif

What's the time scale?
What do you want to happen when B switches while A is high?
Analog switch or anything with an output enable would work,
depending on answer to above question.
mike

--
Return address is VALID.
Bunch of stuff For Sale and Wanted at the link below.
Compaq Aero floppy,ram,battery.
FT-212RH 2-meter 45W transceiver.
Toshiba & Compaq LiIon Batteries, Test Equipment
30pS pulser, Tektronix Concept Books, spot welding head...
http://www.geocities.com/SiliconValley/Monitor/4710/
 
S

Spehro Pefhany

I've been scribbling in vain for an hour and still haven't solved
this. Could someone point me in the right direction please? I want to
get an input pulse A passed to one of two outputs 1 or 2, depending on
the state of input B. Like this:
http://www.terrypin.dial.pipex.com/Images/Logic1.gif

You can use 1/3 of a 74HC4052, which doesn't buffer the signals. If
you have a spare inverter around you can use two AND gates (B, /B
inputs to the gates), or two NAND gates and 3 inverters etc.

Best regards,
Spehro Pefhany
 
G

Gareth

Terry said:
I've been scribbling in vain for an hour and still haven't solved
this. Could someone point me in the right direction please? I want to
get an input pulse A passed to one of two outputs 1 or 2, depending on
the state of input B. Like this:
http://www.terrypin.dial.pipex.com/Images/Logic1.gif

How about two AND gates and an inverter?

The output of the two AND gates are your outputs 1 & 2. A goes to one
input on each AND gate, B goes directly to the other input of the first
AND gate, and to the other input on the second AND gate via the inverter.

1 = A.B

2 = A.not(B)

I think that will do what you want, but it's late here so I may have
missed something.

Gareth.

--
 
T

Thomas Magma

Might want to check this.

InputA AND InputB = Output2
Output2 XOR InputA = Output1
 
P

petrus bitbyter

Terry Pinnell said:
I've been scribbling in vain for an hour and still haven't solved
this. Could someone point me in the right direction please? I want to
get an input pulse A passed to one of two outputs 1 or 2, depending on
the state of input B. Like this:
http://www.terrypin.dial.pipex.com/Images/Logic1.gif

Terry,

(Use fixed font)

Making the truthtabel from your pulse diagram:

B A | S1 S2
-----------
0 0 | 0 0
0 1 | 1 0
1 0 | 0 0
1 1 | 0 1

Which says S1 = /B * A and S2 = B * A
requiring two AND gates and an inverter.

Using The Morgan converts:
S1 = /B * A = /(B + /A)
S2 = B * A = /(/B + /A)

As shown below, one old quad two input NOR gate chip does the trick.


A __ __
------+-|>=| +----|>=|
| |1 |o---+ |1 |o- S1
+-|__| | +-|__|
| |
| |
+-----------|--+
| |
B | __ | __
----+-+-|>=| +---+|>=|
| |1 |o++ |1 |o- S2
+-|__| +-----+|__|


created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

petrus bitbyter
 
C

Charles W. Johson Jr.

Terry Pinnell said:
I've been scribbling in vain for an hour and still haven't solved
this. Could someone point me in the right direction please? I want to
get an input pulse A passed to one of two outputs 1 or 2, depending on
the state of input B. Like this:
http://www.terrypin.dial.pipex.com/Images/Logic1.gif

output 1 is A not B output 2 is A and B

A and noted B
A and B

Use 2 2 input NAnds, invert outputs, tie A and B to one NAnd A and
inverted B to the other

Charles
 
G

George

Terry Pinnell said:
I've been scribbling in vain for an hour and still haven't solved
this. Could someone point me in the right direction please? I want to
get an input pulse A passed to one of two outputs 1 or 2, depending on
the state of input B. Like this:
http://www.terrypin.dial.pipex.com/Images/Logic1.gif

It's simple really. Output 1 is simply a AND gate with inputs of A and
/B(not B). Output 2 is an AND gate with inputs of A and B. This is
just an engineering student's thing, so don't bash me if I'm wrong.
I'm assuming these are logic levels only and not any kind of signal.
 
T

Terry Pinnell

Spehro Pefhany said:
You can use 1/3 of a 74HC4052, which doesn't buffer the signals. If
you have a spare inverter around you can use two AND gates (B, /B
inputs to the gates), or two NAND gates and 3 inverters etc.

Thanks Speff. I don't have a 74HC4052 so I'll go with Petrus's 4001
approach. I blame the lateness and the wine, as it really is pretty
straightforward now that I look at it this morning!

Thanks for all replies. Here's my probable solution:
http://www.terrypin.dial.pipex.com/Images/LogicSolutions.gif

I got a bit preoccupied with trying (in vain) to find a way of using
two 4077 EXCL NOR gates I have spare. But, as I have no other spare
gates anyway, that would still have meant adding another chip.

For those that may be interested, the context is that this arises from
my curtain control project (separate threads). That has to be finished
by tonight. So far my design just has push-buttons for Open and Close,
plus two limit microswitches. All 4 of these deliver a high-going
pulse to set or reset two latches, which respectively drive relays,
one a DPDT controlling motor direction, the other SP switching motor
current on/off. I want to replace them by a single button, for 3
reasons:
- To allow electronic rather than manual triggering (e.g. by a timer,
and/or by a dawn/dusk circuit)
- To minimise wiring
- Because of the obvious redundancy of having two buttons (the state
of the curtains is obvious on sight!)

A brief push will then change the state of the curtains. Or a single
pulse (in parallel with the single button), from say a mains timer set
to 22:00 will close them, while the next such pulse at say 07:00 will
open them.

So:
A = proposed new single button signal
B = state of curtains (arbitrarily, H==>closed, L==>opened)
Out 1 = replacement for signal from Open button
Out 2 = replacement for signal from Close button.
 
T

Terry Pinnell

It's simple really. Output 1 is simply a AND gate with inputs of A and
/B(not B). Output 2 is an AND gate with inputs of A and B. This is
just an engineering student's thing, so don't bash me if I'm wrong.
I'm assuming these are logic levels only and not any kind of signal.

Yep, that does the job, thanks. Same as Charles recommended. Not quite
the 'seegar solution' though, because if I use say 4011 NANDs, it
needs 5 gates.

See also my other posts.
 
T

Terry Pinnell

Gareth said:
How about two AND gates and an inverter?

The output of the two AND gates are your outputs 1 & 2. A goes to one
input on each AND gate, B goes directly to the other input of the first
AND gate, and to the other input on the second AND gate via the inverter.

1 = A.B

2 = A.not(B)

I think that will do what you want, but it's late here so I may have
missed something.

Gareth.

No, unlike me, you coped with the lateness very well! Or maybe it was
that couple of glasses of Pinot Grigio that slowed me down? <g>) That
does it, but see also my other replies.
 
T

Terry Pinnell

output 1 is A not B output 2 is A and B

A and noted B
A and B

Use 2 2 input NAnds, invert outputs, tie A and B to one NAnd A and
inverted B to the other

Thanks. It all looks so easy in the morning! See my reply to George,
who suggested same approach.
 
T

Terry Pinnell

mike said:
What's the time scale?
Urgent!

What do you want to happen when B switches while A is high?
Analog switch or anything with an output enable would work,
depending on answer to above question.

See my other posts.
 
T

Terry Pinnell

Thomas Magma said:
Might want to check this.

InputA AND InputB = Output2
Output2 XOR InputA = Output1

Thanks. See my other replies, especially re my unsuccessful pursuit of
a solution with a mere 1/2 x 4077!
 
T

Terry Pinnell

petrus bitbyter said:
Terry,

(Use fixed font)

Making the truthtabel from your pulse diagram:

B A | S1 S2
-----------
0 0 | 0 0
0 1 | 1 0
1 0 | 0 0
1 1 | 0 1

Which says S1 = /B * A and S2 = B * A
requiring two AND gates and an inverter.

Using The Morgan converts:
S1 = /B * A = /(B + /A)
S2 = B * A = /(/B + /A)

As shown below, one old quad two input NOR gate chip does the trick.


A __ __
------+-|>=| +----|>=|
| |1 |o---+ |1 |o- S1
+-|__| | +-|__|
| |
| |
+-----------|--+
| |
B | __ | __
----+-+-|>=| +---+|>=|
| |1 |o++ |1 |o- S2
+-|__| +-----+|__|

Thanks, Petrus. That's the one I'll implement!
 
R

Rene Tschaggelar

The timescale was meant in nanoseconds per division ...

Rene
 
J

Jim Thompson

On Fri, 16 Jul 2004 08:46:50 +0100, Terry Pinnell

[snip]
Thanks Speff. I don't have a 74HC4052 so I'll go with Petrus's 4001
approach. I blame the lateness and the wine, as it really is pretty
straightforward now that I look at it this morning!

Thanks for all replies. Here's my probable solution:
http://www.terrypin.dial.pipex.com/Images/LogicSolutions.gif
[snip]

The Petrus solution is best... it's what I came up with (except I used
inverters) when I simply entered your requirements into a truth table.

...Jim Thompson
 
T

Terry Pinnell

Jim Thompson said:
On Fri, 16 Jul 2004 08:46:50 +0100, Terry Pinnell

[snip]
Thanks Speff. I don't have a 74HC4052 so I'll go with Petrus's 4001
approach. I blame the lateness and the wine, as it really is pretty
straightforward now that I look at it this morning!

Thanks for all replies. Here's my probable solution:
http://www.terrypin.dial.pipex.com/Images/LogicSolutions.gif
[snip]

The Petrus solution is best... it's what I came up with (except I used
inverters) when I simply entered your requirements into a truth table.

...Jim Thompson

The bad news is that, although that logic section worked exactly as
planned, there's some flaw in my reasoning on how to incoprporate it
into my curtain controller. (When I get time, I'll post the full
circuit, as I'm sure there are many improvements I could achieve.)

The good news is that I have it working anyway. As an alternative to
that 'single pulse generating two pulses' idea, I built a light/dark
detector last night. I expect to be able to get that interfaced today.

Whether I'll feel happy leaving for two weeks without thorough testing
has yet to be decided. I think my wife, Janet, has visions of
returning to a smouldering ruin, with curtains opening and closing at
around 1 Hz!
 
R

Rich Grise

Terry said:
current on/off. I want to replace them by a single button, for 3
reasons:
- To allow electronic rather than manual triggering (e.g. by a timer,
and/or by a dawn/dusk circuit)
- To minimise wiring
- Because of the obvious redundancy of having two buttons (the state
of the curtains is obvious on sight!)

A brief push will then change the state of the curtains. Or a single
pulse (in parallel with the single button), from say a mains timer set
to 22:00 will close them, while the next such pulse at say 07:00 will
open them.

So:
A = proposed new single button signal
B = state of curtains (arbitrarily, H==>closed, L==>opened)
Out 1 = replacement for signal from Open button
Out 2 = replacement for signal from Close button.

Why not use the existing reversing relay? Make it a latching relay,
and when you push the button, it goes whichever direction the relay
is pointing. Even mechanically connect the limit switches, and
dispense with the relay entirely.
 
R

Rich Grise

Terry said:
Whether I'll feel happy leaving for two weeks without thorough testing
has yet to be decided. I think my wife, Janet, has visions of
returning to a smouldering ruin, with curtains opening and closing at
around 1 Hz!
"No! No! I said _six_ hundred _one_ foot tall!"
 
Top