Electronics > Beginners

The most versatile logic gate?

<< < (4/4)

Simon:
uh logic gates what are they ?

Can't think of any examples but remember been shown in school how whole "circuits" could be reduced to just a single IC. When you design in equivalent NANDs and then look at the circuit as a whole forgetting the gates you emulated you will find that many can be taken out, the most classic being the output of one "gate" is noted and the input of the gate it connects to in also noted so 2 gates dissapere.

of course if you have a limited little application where speed is not an issue you could use your nots and the resistors

Simon:
Well this discussion is mostly academic I think, your solution works for single gate replacements or simple thing but ultimately is more expensive and take up more space than a couple of NAND IC's

Zero999:

--- Quote from: Simon on October 04, 2010, 06:26:51 pm ---uh logic gates what are they ?

Can't think of any examples but remember been shown in school how whole "circuits" could be reduced to just a single IC. When you design in equivalent NANDs and then look at the circuit as a whole forgetting the gates you emulated you will find that many can be taken out, the most classic being the output of one "gate" is noted and the input of the gate it connects to in also noted so 2 gates dissapere.

of course if you have a limited little application where speed is not an issue you could use your nots and the resistors

--- End quote ---

This is the problem with school is you learn don't learn much about the real world.

It's pretty obvious when you think about it. For a start there are six gates in a 74HC14 Schmitt trigger IC, which means you can save an IC just using resistors alone, even if you only want five NAND gates but what if you want an AND gate and an OR gate?

The two universal gate types are NAND and NOR.

With NAND gates, you'll need four for the OR and two for the AND.

With NOR, you'll need four for the NAND and two for the OR.

Either way, it's six gates, two ICs in total.

The cheapest solution is to get one quad OR IC and make the AND with resistors or you could get a AND IC and make the OR with resistors. The gate capacitance and high/low voltage of logic ICs can be found on the datasheet so the additional propagation delay can be calculated:

Take the 74HC00 for example:
http://www.nxp.com/documents/data_sheet/74HC_HCT00.pdf
C = 3.5pF
R = 100k

Typical high/low voltages with 4.5V supply:
VH = 2.4V
VL = 2.1V

% charge on the input capacitance when charging and discharging from either supply rail to VH and VL respectively.
VH/Vs = 2.4/4.5 = 53.33%
(Vs - VL)/Vs = (4.5-2.1)/4.5  = 2.4/4.5 = 53.33%

That makes sense, the high and low voltages are biased around half the supply voltage, go 3.33% above and it's high and 3.33% below and it's low.

From the RC circuit formula.
http://en.wikipedia.org/wiki/RC_circuit

t = RC*ln(1-%charge)
Remember we've already don't need vC or Vin since it's just the ratio that's important and we've already got that, it's 53.55%

RC = -350*10-9s

t = 350*10-9*ln(1-0.5333) = 266.7*10-9s = 266.7ns

Of course this is much slower than the 23ns listed on the datasheet but it won't matter at low frequencies (below a couple of MHz) and if the resistors are reduced to 1k the delay only 2.67ns extra but disadvantage is the current will be higher.

The current consumption:
The tiny current consumption of the gates can be ignored. When both inputs are high the resistance will be 150k 4.5/150k = 30µA

--- Quote from: Simon on October 05, 2010, 06:47:25 am ---Well this discussion is mostly academic I think, your solution works for single gate replacements or simple thing but ultimately is more expensive and take up more space than a couple of NAND IC's

--- End quote ---
No, resistors are cheap compared to IC, check out the prices in RS, Farnel etc.