+ Reply to Thread
Results 1 to 9 of 9

Thread: Discrete logic gates

  1. #1

    Default Discrete logic gates

    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 Thumbnails Attached Thumbnails Click image for larger version

Name:	discrete_logic_schematic.jpg‎
Views:	769
Size:	496.3 KB
ID:	71106  
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  2. #2

    HollyMinkowski's Avatar
    Location
    Everywhere .......... (I'm a non-local phenomenon)
    Posts
    1,399

    Default

    Imagine what a bunch of logic gates made using little relays would sound like

    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
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  3. #3

    Default

    Thought I would throw this in for you HollyMinkowski and Bobb ... this is what it looks like in layout.

    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.
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	GATES.JPG‎
Views:	181
Size:	1.51 MB
ID:	71115  
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  4. #4

    Default

    Holly, no need to wonder. A CS professor built a computer out of relays and his video has sound:

    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. Iwrote 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 educationalvalue and interfacing power circuits with TTL logic.

    Post Edited (Martin_H) : 6/12/2010 11:39:46 AM GMT
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  5. #5

    Default

    Beau Schwabe (Parallax) said...
    Thought I would throw this in for you HollyMinkowski and Bobb ... this is what it looks like in layout.
    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!"
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  6. #6

    Default

    BradC,

    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.
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  7. #7

    Default

    @Beau: My 1977 Gottleib pinball game (Jungle Queen) is the last year of relay logic, as they went solid state in 1978. It is truly a labor of love to keep that thing going, there are massive solenoids, MANY relays and several rotating multiwiper disks; troubleshooting is a bear. I don't even have the manual, when it stops working, I rely on common sense and brute force. Ain't failed yet! The heat given off by those electromechanicals and numerous #47 incandescent bulbs releases that distinctive smell of vintage wiring insulation. Probably toxic, but who cares, it's AWESOME! Not unlike the heat and smell and marvelous glow given off by the vacuum tubes in my Philco radios & TVs and old Heathkit ham gear.

    Old school ROCKS!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you build it, they will come."
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  8. #8

    Default

    erco,

    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.
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

  9. #9

    Default

    Bobb - thanks for the circuits!

    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 withoutworry 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
    Last edited by ForumTools; 10-01-2010 at 10:09 PM. Reason: Forum Migration

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts