Logic Gate Search, Can't find it. Help! - Page 1
Forum section: electronics / beginners

author: Falcon69
author_rank: Super Contributor
timestamp: August 12, 2014, 05:21:52 am
content: I am trying to find a single logic gate (single chip, maybe more than 1 gate in the single chip to serve purpose maybe?).I would like to find a single SMD chip that will work like the truth table I have drawn for Truth Table 3. If I could find a chip that will do this, it will eliminate having to use several chips/logic gates and take up space on the PCB.Truth Tables 1 and 2 would work also, but that would be 2 chips.If you could point me in the right direction, it would be much appreciated.I can't use Micro-controllers. I don't have the equipment (or know-how) to program them.A,B,C,D are inputs, the Q's are outputs. These will be ran with a 5v supply source, and less then 10mA per output.Thanks in advance.

author: bwat
author_rank: Frequent Contributor
timestamp: August 12, 2014, 05:29:04 am
content: What about a ROM or a CPLD or a FPGA? Any good book on digital design will show you how to do it.

author: miguelvp
author_rank: Super Contributor
timestamp: August 12, 2014, 05:35:20 am
content: With some clever rewriting you might be able to fit them on a PSoC4200You have some redundant outputs, some negated outputs that could be combined to fit.Plus you always can use the Cortex M0 plus 32 kB of flash with Read Accelerator and 4 kB of SRAMEdit:Btw you have 2 missing cases, one in Gate 3 when all the inputs are low and one in Gate 2 when all the inputs are low, and Gate 1 is just a pass through so you don't need the LUT.In Gate 3, Q3 is C and Q4 is D, and Q1 and Q2 are Low unless both Q3 and Q4 are low in which case Q1 is A and Q2 is Not A. And the missing all low case will be Q1 L, Q2 H, Q3 L and Q4 L

author: Falcon69
author_rank: Super Contributor
timestamp: August 12, 2014, 05:40:50 am
content: You guys are way over my head. Imagine when electronics first came out. there were no microprocessors, no fpga, only transistors, mosfets, logic gates, diodes, resistors, caps, etc. That's my level of learning right now.

author: bwat
author_rank: Frequent Contributor
timestamp: August 12, 2014, 05:43:34 am
content: As I said, a good book will help you outThere is no royal road to digital design.

author: Skimask
author_rank: Super Contributor
timestamp: August 12, 2014, 05:49:02 am
content: 74S571 PROMProgram it "by hand", wires, switches, etc. (only have to program 8 locations after all)A-B-C go to the address inputs, Qx to the outputs.When done programming, hard wire the outputs active.

author: Falcon69
author_rank: Super Contributor
timestamp: August 12, 2014, 05:52:55 am
content: Right, Truth Table 3, when all inputs are low, so are all the outputs.

author: Falcon69
author_rank: Super Contributor
timestamp: August 12, 2014, 05:53:31 am
content: Mouser turns up no search results for 74S571

author: miguelvp
author_rank: Super Contributor
timestamp: August 12, 2014, 06:09:57 am
content: If they are all low when the inputs are low then:Q3 is C you just need a buffer.Q4 is D you just need a buffer.Q1 is NOT(NOT C AND NOT D) AND AQ2 is NOT(NOT A AND NOT C AND NOT D) AND BDoesn't seem to need anything complicated unless I goofed up.The reason for the PSoC 4 is that they are still available for just $1 a pop free shipping worldwide, and you have 3 packages to choose from, and you don't need to actually use the microprocessor if you don't want to, but yeah, it will be harder to program.http://www.cypress.com/?id=2218Unless you get the prototyping kit for $4 (no free shipping i'm afraid) but with the programmer and plenty of GPIOshttp://www.cypress.com/?rID=92146

author: miguelvp
author_rank: Super Contributor
timestamp: August 12, 2014, 06:17:51 am
content: Quote from: Falcon69 on August 12, 2014, 05:53:31 amhttp://www.findchips.com/search/74S571http://octopart.com/partsearch#!?q=74S571

author: nitro2k01
author_rank: Frequent Contributor
timestamp: August 12, 2014, 07:38:06 am
content: Could you reveal what this logic function is actually supposed to do. That might help us understand what you need. (Sometimes what the "customer" needs isn't what the "customer" asks for...)Firstly, you haven't defined what should happen if A-D are all 0. If that state deviates a lot from the rest of the table, that might make the function more difficult to implement. (As pointed out before.)I'm noticing that Q3 and Q4 are just following C and D, respectively, without being affected by the other bits. You should be able to just put a buffer on those. I'm also noticing that in most of the cases Q1 and Q2 are low, and only high in three of the input cases. In all the case where Q1 or Q2 are high, D is low.If want to learn a little, and you're willing to accept a 3 chip solution consisting of 3 chips from the 7400 series, here's a solution for you. The solution consists of* 7400 quad 2 nand gate* 7402 quad 2 nor gate*74139dual 2-to-4 line decoder/multiplexer (click for datasheet)You are recommended to get the CMOS (hc) variants of the chips, so 74hc00 and so on, instead of the TTL logic version (just 7400 etc), which you can't get any more anyway.So let's start with the easy outputs, Q3 and Q4. Those just follow C and D. Here's I'm using left-over NAND and NOR gates as inverters by connecting both inputs to the same source, and inverting twice creates a copy of the original C and D signals.In the heart of the Q1 and Q2 control circuitry is the decoder, one half of a 74139. The decoder takes two inputs and uniquely selects one output based on each of the 4 possible states of the inputs. There is also an enable input, which if disabled, disabled all of the outputs. Since C and D must both be 0 for the cases when Q1 or Q2 are high, I'll use C and D for controlling the enable input. An OR gate fits the bill. If either C or D are high, the output is high, and the enable input is disabled, since it's active low. However, to reduce the number of chips used, I will instead be using a NOR followed by an inverter, also made out of a NOR gate.Now, let's connect A and B to the inputs of the decoder. One of the three interesting cases is when AB=LH, which is the only case when Q2 goes high. AB=LH outputs Y2=active. However, the decoder outputs active low, so an inverter is needed here. The inversion of Y2 becomes Q2.The other two interesting cases are AB=HL and AB=HH. AB=HL gives that Y1 is active and AB=HH gives that Y3 is active, again in both cases active means L. Now, a NAND gate is in order. Y1 NAND Y3 gives that if either Y1 or Y3 is low, the output is high. This becomes the Q1 output of the whole circuit.

author: 22swg
author_rank: Frequent Contributor
timestamp: August 12, 2014, 07:40:10 am
content: Diodes and resistors ?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 12, 2014, 07:55:40 am
content: Quote from: miguelvp on August 12, 2014, 06:09:57 amHaven't crossed this against the table, but it sounds reasonable.Note that (switching to C's logic notation):(1) (~C & ~D) == NOR(C, D) == NOR(0, C, D)(2) (~A & ~C & ~D) == NOR(A, C, D)So a pair of 3-input NOR will do the worst of it.Then, the outer function:Q1 = ~(1) & AQ2 = ~(2) & Bwhich requires a (Y = ~A & B) operation.We can switch from 3-in NOR to 3-in OR which takes care of the negation, then use a pair of 2-in AND to finish the job.The ANDs can also be swapped to notted-input NORs, which means we can use regular NORs, which means any leftover 3-in NORs are back.A single-chip solution unfortunately isn't *quite* achievable with off the shelf parts, because 3-in NORs aren't available in quads. But you can pair something like 74HC27 with a 74HC1G02, a little SOT-23-5 device to fill in the gap.Or as was mentioned, you can try changing your requirements. A naive approach probably won't turn up anything more than equivalent logic, but a more aggressive approach might be productive (can you use power supplies or analog switches or switching transistors to replace columns in the truth table?).As for all those people who jumped right straight into programmable logic... you all should be ASHAMED.Tim

author: Psi
author_rank: Super Contributor
timestamp: August 12, 2014, 07:57:29 am
content: If you know someone whocanprogram MCUs it's really only 1min of time to code that and hand you the chip.

author: bwat
author_rank: Frequent Contributor
timestamp: August 12, 2014, 08:16:43 am
content: Quote from: T3sl4co1l on August 12, 2014, 07:55:40 amGod forbid we should offer a solution that actually meets his all in one package requirement.Anyway, you old timers who are happy drawingKaranugh mapsand have all the identities of theBoolean algebraingrained in their bone marrow, should really "get with the program". Letting the machine do it is much faster

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 12, 2014, 08:24:55 am
content: Screw that, if I have a mess of logic I let a minimizer handle it!Tim

author: miguelvp
author_rank: Super Contributor
timestamp: August 12, 2014, 08:42:09 am
content: Quote from: T3sl4co1l on August 12, 2014, 08:24:55 amYou are right since it wasQ1 = (NOT C AND NOT D) AND AQ2 = ((NOT C AND NOT D) AND NOT A) AND BQ3 = CQ4 = DSo you can take (~C&~D)then the A can be bifurcated to A and ~AThe A gets ANDed with the previous for Q1The ~A gets ANDed with the previous and ANDed with B for Q2But I've been drinking

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 12, 2014, 09:14:44 am
content: Quote from: miguelvp on August 12, 2014, 08:42:09 amSo am I...now. Rum and cokeTim

author: amyk
author_rank: Super Contributor
timestamp: August 12, 2014, 01:16:06 pm
content: 2-chip solution with either dual NOR-4 (e.g. 74HCT4002) + hex NOT, or dual NOT (74LVC2G04, NC7WZ04, etc.) if you don't need the buffered Q3/Q4.

author: German_EE
author_rank: Super Contributor
timestamp: August 12, 2014, 06:53:11 pm
content: For stuff like this I normally use a spare EPROM, inputs are the address pins and outputs are the data pins. If you make a mistake then just expose it to UV light and start again.

author: cosmos
author_rank: Regular Contributor
timestamp: August 12, 2014, 07:50:04 pm
content: Would not a hex (6x) open drain inverter (74xx05) and two resistors do this?resistors don't count as chips do they? :-)Q3 = CQ4 = DQ2 = R from B wired to A1b and C1b and D1bQ1 = R from A wired to C2b and D2bTo serve the 10mA req. you would need low value resistors, but the spec does not say anything about at what voltage the 10mA must be delivered so maybe it is still ok.