Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8 Inputs & 2 Outputs

Status
Not open for further replies.

Suraj143

Active Member
I have 8 inputs & 2 outputs.

If any input present it must turn on one output.
If another input present it must turn on the other output.
If another input present it must not do anything until any output is vacant.

Whats the easiest way of doing with CMOS logic?
 
So, if one input is present (high?) then first output is high.
If 2 or more inputs are present then both outputs are high.

Is this correct?

Mike.
 
Last edited:
I have 8 inputs & 2 outputs.

If any input present it must turn on one output.
If another input present it must turn on the other output.
If another input present it must not do anything until any output is vacant.

Whats the easiest way of doing with CMOS logic?

it seems pretty easy to explain, say if inputs are A,B,C,D,E,F,G,H and out puts are X,Y

one out put is to "OR" all the inputs... X=(A+B+C+D+E+F+G+H)
2nd out output is to make two out of 8 combination..may need simplification Y= ABC'D'E'F'G'H' +A'BCD'E'F'G'H'+.........
your 3rd condition is satisfied when 1 st & 2nd are in place...

Edit: since 2 or more will make the 2nd out put high there are dont care terms that will simplify the equation further.... Y= AB+BC+CD+DE+EF+FG+GA+AC+AD+AE+AF+BD+...... will be total 28 combination for 2nd out put
 
Last edited:
Here's a really ugly implementation that only requires 16 AND gates, one 8-input OR and an inverter:

**broken link removed**

The first OR output ("A") says "any input was selected" (which will cause output 1 to be turned on by any AND);
the other output ("B") says "no input was selected" which will cause output 2 to be turned on by any AND.
(I got the two outputs reversed; O1 was supposed to be the one turned on first. Oh, well.)

(Now that I've drawn this, I realize you probably don't need all them diodes in front of the OR ...)

25 cents to anyone who can simplify this mess.

You could probably do all this with less hardware by using a microprocessor with 8 inputs.
 
Last edited:
how can you get O2 high when A is high?? ie B is low?

You can't. Never mind. Scratch that idea.-

Question to the O.P.: you said "If another input present it must not do anything until any output is vacant.". This implies that something happens when an input goes "vacant" (we usually say it goes low instead), but what? In other words, let's say 4 of the inputs are high, so both outputs are enabled: what happens when one of the inputs goes low? anything?

How about if only two inputs are high: if one goes low, does the 2nd output go low (since only one input is high now)? and I assume that if only one input is high, that if it goes low, both outputs go low, correct?
 
Last edited:
You could do it sequentially with an 8-input multiplexer, a couple of J-K flip-flips, and some additional control circuitry. You sequentially scan the eight inputs (driven by a clocked counter). The J input of the first flip flop is connected directly to the mux output. Its Q output is ANDed with the mux output. The AND output goes to the J input of the second flip-flop. Each flip-flop is clocked by the mux counter clock.

It's operation is this: At the start of the scan you reset both flip-flops. If one mux input is high during the scan it will set the first flip-flip. If two or more inputs are high it will set the second flip-flop.

If you can't tolerate both flip-flops being reset to zero at the start of each scan, then you will have to add a pair of latches (or additional flip-flops) at the flip-flop output to capture and hold the data when the primary flip-flops are reset.

Edit: But I agree with Ian. Doing this with a microprocessor would be much easier and require fewer parts.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top