Maker Pro
Maker Pro

Logic GAtes

brojeremyk

Nov 29, 2022
2
Joined
Nov 29, 2022
Messages
2
I need a circuit that says:
When 'a' is off, output 'b'
when 'a' is on, output opposite of 'b'
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,758
Joined
Nov 17, 2011
Messages
13,758
More than method is possible.
E.g. look up multiplexers (to select b or not b) and inverters (to create not b).
Or look up EXOR gates.
 

danadak

Feb 19, 2021
782
Joined
Feb 19, 2021
Messages
782
Another way of doing this is with a simple micro and program it
with block language

1669929740486.png

Use a 8 PIN ATTINY85 to do the job.

This of course is not basic logic elements so there is a small delay
in processing the code.

The program, mBlock, is free, it generates Arduino code from your block
configuration, and you can use that with an Arduino Nano board to program
the ATTINY85, or just use the Arduino board as the logic processor.

Lots of fun, quick way of doing simple projects, if you dont code in C or
other languages.


Regards, Dana.
 

danadak

Feb 19, 2021
782
Joined
Feb 19, 2021
Messages
782
A little more adventuress, use a chip with cut and paste resources internal to it.

1669931409291.png

Here are 3 different solutions, all using chips internal resources, to do your problem.

In this case its a codeless design, you just hit build button after you drag and drop onto canvas
various resources and use wizard to wire out to pins or internal to other resources. Tool then
programs part for you with configuration.

Other more complex resources you would of course use programming.

Right hand window shows resources used / left, as you can see we hardly used any.

Here is what is onchip, in many cases multiple copies :

1669931573660.jpeg

The compiler and software, PSOC Creator, are free, starting board $ 15.



Regards, Dana.
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,758
Joined
Nov 17, 2011
Messages
13,758
@danadak :
- Possible? Yes.
- A bit of overkill? Definitely!
Don't you think so ;) ?
 

danadak

Feb 19, 2021
782
Joined
Feb 19, 2021
Messages
782
@danadak :
- Possible? Yes.
- A bit of overkill? Definitely!
Don't you think so ;) ?
Overkill for specific OP problem yes, informative for OP for future
stuff possibly not. After all hard to beat a protoboard and a
pile of parts in one chip for learning, testing out ideas.......


Regards, Dana.
 

dragon

Oct 31, 2022
248
Joined
Oct 31, 2022
Messages
248
I need a circuit that says:
When 'a' is off, output 'b'
when 'a' is on, output opposite of 'b'

this is what this circuit does!


the top wire is !b, the bottom wire is b, the two power supplies are opa and opb.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,758
Joined
Nov 17, 2011
Messages
13,758
@dragon How is this circuit supposed to work? Where is the output? What if the input signals are static?
I doubt that this is useful to the op.
 

dragon

Oct 31, 2022
248
Joined
Oct 31, 2022
Messages
248
@dragon How is this circuit supposed to work? Where is the output? What if the input signals are static?
I doubt that this is useful to the op.

The output is the two wires on the right, the bottom one is the converse output and the top one is the inverse output.
Its a bit like an op amp without the amp, its doing an analogue comparison.

If the input is static the output is static.
 
Top