Discrete logic gates
Bobb Fwed
Posts: 1,119
This would have helped me early on in the electrical endeavors, so I wish to share them with others.
Attached is schematics to wire logical circuits (like OR, AND, NAND, NOR, XOR). Most of these have been tested on a bread board or at least in Spice. Please tell me about any errors or ways to make better circuits. This hopefully is a work in progress and maybe other useful circuits will make their way on here. Most of the circuits I have created on my own, but a couple I have found from various places on the net.
Generally speaking, a "better" circuit (ones I would like to hear about) would mean less parts, or same number of parts but using less power or are more TTL compatible.
==============================================
This document contains schematics to make logic gates from discrete components.
The top row is the “Signal” version of the circuits. These are useful for interfacing the output with high-impedance inputs. Most have a weak pull up (10K-ohm) for a logic high and are open-drain when logic low.
The bottom row is the “Power” version of the circuits. These are useful for powering components or interfacing with other TTL or high-impedance input devices (a pull-down resistor should be added to outputs in these case). Most do not have any pull resistor on the output, but will be a high output when logic high, and become high-impedance when logic low. Note that power will back-feed through the P-channel MOSFETs if voltage is applied to output and none is applied to INPUT of the circuit.
The schematics have INPUT symbols. If above the INPUT symbol there is an “INV” the voltage applied here must be the same as IN's logic high. If there is no text, any voltage can be applied as long as it is compatible with the transistors used.
Most of the schematics in the black boxes have TTL-compatible IN's. Also contained in the document is red boxes with alternate wiring options. These are usually simpler, but may not be compatible with TTL other devices.
Note that most of the circuits will view no input on the IN as a logic low, but not all will.
The advantage of these circuits over prefabricated ICs (besides the obvious educational values) is the option to interface different voltage components with each other. Though the resistor values may need changing if you aren't using the recommended 2.8V-6V range, the majority of these circuits can accept inputs or output at greatly varying voltages.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
Attached is schematics to wire logical circuits (like OR, AND, NAND, NOR, XOR). Most of these have been tested on a bread board or at least in Spice. Please tell me about any errors or ways to make better circuits. This hopefully is a work in progress and maybe other useful circuits will make their way on here. Most of the circuits I have created on my own, but a couple I have found from various places on the net.
Generally speaking, a "better" circuit (ones I would like to hear about) would mean less parts, or same number of parts but using less power or are more TTL compatible.
==============================================
This document contains schematics to make logic gates from discrete components.
The top row is the “Signal” version of the circuits. These are useful for interfacing the output with high-impedance inputs. Most have a weak pull up (10K-ohm) for a logic high and are open-drain when logic low.
The bottom row is the “Power” version of the circuits. These are useful for powering components or interfacing with other TTL or high-impedance input devices (a pull-down resistor should be added to outputs in these case). Most do not have any pull resistor on the output, but will be a high output when logic high, and become high-impedance when logic low. Note that power will back-feed through the P-channel MOSFETs if voltage is applied to output and none is applied to INPUT of the circuit.
The schematics have INPUT symbols. If above the INPUT symbol there is an “INV” the voltage applied here must be the same as IN's logic high. If there is no text, any voltage can be applied as long as it is compatible with the transistors used.
Most of the schematics in the black boxes have TTL-compatible IN's. Also contained in the document is red boxes with alternate wiring options. These are usually simpler, but may not be compatible with TTL other devices.
Note that most of the circuits will view no input on the IN as a logic low, but not all will.
The advantage of these circuits over prefabricated ICs (besides the obvious educational values) is the option to interface different voltage components with each other. Though the resistor values may need changing if you aren't using the recommended 2.8V-6V range, the majority of these circuits can accept inputs or output at greatly varying voltages.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
Comments
I guess those logic gate schematics you posted an image of are what Chip used
to design the Propeller, just implemented on a silicon wafer instead of big clunky
parts. Just the thought of the complexity makes my head spin. I'm looking into
playing with FPGA's and that is really complicated too.... I am starting to think it's
too much for me.
Post Edited (HollyMinkowski) : 6/12/2010 6:05:35 AM GMT
The individual gates start getting complex with the XOR/XNOR, but escalate to another level with something like a simple flip-flop. There are tricks you can do that allow you to use far less number of gates to get a function equivalent output than if you were to build a gate function purely with the gate elements. A good example is an XOR/XNOR.
Now days you could probably use 'little' relays (almost sounds like a fun project), but years ago I remember a friend of my dads that used to work on pin-ball machines (I think that was actually his full time job) ... the 'logic' inside was nothing but relays and it made wire wrap boards look like a child's pull-toy to look inside one.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
http://web.cecs.pdx.edu/~harry/Relay/
It sounds a little like the robot from Lost in Space, but I'm dating myself with that reference.· I went over his design materials on his site and learned a lot from them.· I·wrote him to ask him why he avoided the use of diode logic because it would have simplified his design in spots.· He wrote back and said he wanted to avoid semi conductors because he wanted the impact of the sound of clicking relays.
Personally I just use 7400 series chips when I need logic circuits as they're cheap and easy to use.· But Bobb has a good point about the educational·value and interfacing power circuits with TTL logic.
Post Edited (Martin_H) : 6/12/2010 11:39:46 AM GMT
That was really cool Beau. Did you just whip that up, or are they some cut'n'paste gates you use when laying out?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I mean, if I went around sayin' I was an emperor just because some moistened bint had lobbed a scimitar at me they'd put me away!"
Yes to ALL of the above...
I did just put that together from an existing library we have just to show the different gates used ... there are many others, but those are the most used ones.
Since we built our own standard cell library from scratch, at one time each one of those gates I put together. Notice that they all share the same pitch. The top and bottom rails include power and ground as well as an NWELL tap (power) and a PWELL tap (ground). (<-Taps reduce the risk for CMOS latchup by forming a reverse diode). Because they share the same pitch they can easily be abutted to one another to form building blocks to a much larger gate design. Because of the way that the power is distributed, they can also be flipped and mirrored to maximize their real estate requirements.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Old school ROCKS!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Somewhere I still have a couple of the relay coils, not the contacts, just the coils. Miles! of horse-hair copper wire. At one time I had a shoe-box full of them. I used to re-purpose the wire for homemade coils and other things when I was younger.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I use the diode/resistor OR gate in my current product.
Why not an OR integrated circuit? Didn't have one on hand, AND, using discrete components allows me to "sprinkle around" that logic function on the board without·worry about trace layout.
Texas Instruments has a product line called "simple logic" ("small logic"?) that's the same idea; individual gates in teeny-tiny packages that can be scattered about.
Later,
DJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (davejames) : 6/16/2010 3:48:23 PM GMT