4

I've been trying to follow Ben Eater's 8 bit computer design (https://eater.net/8bit) and I've manged to build something that broadly works but it's not very reliable. Sometimes modules don't work, if I reset the system and try again they might work. It's all very frustrating.

The main point where I've deviated from the original design is the choice of chips. In the original design, Ben used 74LS___ chips, but I had trouble getting hold of these, so instead I've used some 74HC___ chips.

I'm using a mixture of LS, HC and HTC.

Can somebody tell me what is the difference between

  • 74ls___
  • 74hc___
  • 74hct___

I'm using a 5 volt bench power supply and lots of decoupling capacitors. I can see that all the chips are all getting about 5 volts. The clock is running at fractions of hertz through to 10's of hertz, so speed should not be a problem.

JRE
  • 67,678
  • 8
  • 104
  • 179
Stormcloud
  • 243
  • 2
  • 9
  • Are you using all HC parts or are you using a mix of HC and LS? – The Photon Aug 17 '20 at 15:47
  • 2
    You will also encounter 74xx (no letter at all) and 74Sxx and 74Fxx. Especially if you run after rare chips. That 16x4 RAM 189 or so Ben Eater uses has no letter. If you want to upgrade to a 74LS181 ALU and you want the fast carry look ahead '182 you won't find it in LS, but you might find in S or F version of it. – Gunther Schadow Aug 17 '20 at 16:42
  • 1
    Sorry to hear about the difficulties, right now. Glad to hear about all the work you've put into this. Good question, considering. +1. I didn't have access to HC or HCT parts when I built a CPU. I also used wire-wrapping and no solderless protoboards. I'd definitely recommend first testing your circuit on a protoboard at slower speeds and, when you are sure it's what you want, transferring it onto small boards using more reliable wiring methods. At least, for those sections you don't feel you'll need to frequently modify, anyway. HC and LS don't well mix, which is why HCT helps a little. – jonk Aug 17 '20 at 18:53
  • @The Photon, I'm using a mixture of LS, HC and HTC. I've a horrible feeling that this might have been a bit of a mistake... – Stormcloud Aug 18 '20 at 17:26
  • @Gunther Schadow, Thanks for the advice. Getting those memory chips was an insurmountable problem, so I had to implemented my own design. I followed the basic principle of keeping everything in their own modules so I could test it out in isolation of the reset of the system. – Stormcloud Aug 18 '20 at 17:32
  • @jonk, Thanks for the reassurance. Right now I need it! I've implemented by system entirely on Breadboards. Ultimately I'd like to add my own tweaks to the system (a Half Carry Flag, a stack register the Add/Subtract-With-Carry instructions) so I'll be playing with the design if/when I get it to work – Stormcloud Aug 18 '20 at 17:35
  • 1
    @Stormcloud I had no web (1974) and no one else to talk with. There were very few textbooks (zero, I knew about.) Mostly, I had to work only from the TI databook and some ancillary materials I could find -- papers here and there -- and just think for myself. It took me a long time to work it out well enough to get something working well. But I learned a lot in the process, too. I was used to putting thousands of hours into projects by then -- I'd built two telescopes by then, grinding the mirrors and maksutov blanks and then testing them and some rocketry projects, too. But yeah, I felt pain. – jonk Aug 18 '20 at 17:45
  • @Stormcloud Sounds like you want to keep these on protoboards. That's going to be a continuing source of troubles as the connections are uncertain and prone to needing periodic re-estabilshment and each of them add some 5 pF, too. When you reach a certain level of connections, some kind of "critical mass" so to speak, you are spending all your time going through the wiring with none left over for anything else. – jonk Aug 18 '20 at 17:49
  • 1
    The Photon is correct, and mixing logic families is a problem. Almost certainly you have an issue with the 74189 outputs, since all the other parts are available in HC/HCT. If the 74189s are ONLY driving 74HCTs, you should have no problem. If you are driving 74HCs, try connecting each 74189 output to +5 via a 2k resistor. This will pull the outputs high enough to guarantee the required input levels for 74HC. – WhatRoughBeast Aug 18 '20 at 20:31
  • @jonk Can I ask what you mean by adding 5pF capacitors? – Stormcloud Aug 20 '20 at 08:16
  • @Stormcloud Sure. A solderless breadboard has about 5 pF between two adjacent rows. – jonk Aug 20 '20 at 08:17
  • @jonk - Ah! you are saying the physical metal plates that make a row of the breadboard act like the plates inside a capacitor. Got it. Thank you – Stormcloud Aug 21 '20 at 08:27
  • Thank you everybody or helping me. As I can only select one answer as the 'correct' one I've gone for the highest voted one. That's not so say the information in the other answers isn't invaluable - you've all helped me out. – Stormcloud Aug 21 '20 at 08:32

4 Answers4

4

74LS is Low-power Schottky - the output High level may be as low as 2.4 volts whne Vcc is 5 volts

74HC is High-speed CMOS - its inputs expect a High level to be above 2.5 volts when Vcc is 5 volts

74HCT is TTL=compatible High-speed CMOS. Its inputs have a lower threshold for a High, to be compatible with 74LS outputs.

This information can be found in the datasheets for the various families.

Peter Bennett
  • 57,014
  • 1
  • 48
  • 127
4

In comments you said,

I'm using a mixture of LS, HC and HTC.

As other answers have pointed out, the main difference is that LS is a TTL family and HC is a CMOS family. TTL and CMOS have different ranges of voltages that are considered valid logical 1's or 0's. So you have to be careful when mixing them in a design.

The main thing you want to watch out for is you should not connect LS outputs to HC inputs. This is because TTL is quite weak when driving a "1", while CMOS requires a fairly strong "1" to work reliably.

This issue is exactly why HCT parts exist --- they are CMOS chips with TTL-compatible inputs, so having an LS output drive an HCT input is perfectly okay.

Having a HC or HCT output drive an LS input is also not ideal, but will usually work acceptably. If you have very large fan-outs (one output driving more than 4 or 5 input pins) you should look more carefully at whether that output can deliver enough current to drive all the inputs you have connected.

If you're seeing unreliable operation, most likely you have a TTL output driving a CMOS input somewhere.

One other thing to watch out for:

Allowing a TTL input to float is usually okay (it will be equivalent to a high input), but you should never leave a CMOS input floating, even if you aren't using the output of the gate associated with that input.

The Photon
  • 126,425
  • 3
  • 159
  • 304
  • Thank you. Can I ask why you say that unused CMOS inputs shouldn't be left floating? I've checked the fanout of the LS chips - they are very limited, so hopefully they are OK – Stormcloud Aug 20 '20 at 08:20
  • 2
    @Stormcloud, because CMOS has such a high input impedance, a floating input could be read as either high or low, or even wiggle back and forth between high and low, and this can cause excess power consumption or even make the other gates in the same package give false results. – The Photon Aug 20 '20 at 15:34
3

There are a number of important differences. One key item is that the CMOS devices (74HC and 74HCT which are high speed CMOS and high speed CMOS with TTL compatible levels) do not like slow rise and fall times.

Here is a snippet from the 74HC(T)173 quad D type flip flop: 74HC173 input transition rate

You will notice there is a maximum transition rate.

You can read more on this subject at this TI application note. Here it is not the clock rate, but the input rise / fall rate that matters.

With a slow rising or falling input, the internal CMOS structure is in the active region for quite a while and will consume significant (for CMOS) class A current.

The fundamental internal architecture is also very different so even though functionally a 74HC74 and 74LS74 are the same (but with significant timing differences), internally they are very different indeed.

Another issue you may have is that due to the different propagation delays through the gates, you may be encountering logic race conditions that do not exist when using 74LS parts.

For illustration, here is the propagation delay for the 74HC173 (notice that clock to output high and clock to output low is symmetrical): 74HC173 prop delay

Now here is the same specification for the 74LS173:

LS173 prop delay

You can see that not only are the propagation delays different between the two parts, for the LS device, the delay is different for high to low and low to high.

Any of these differences could easily cause problems.

Peter Smith
  • 21,923
  • 1
  • 29
  • 64
2

Welcome, the difference between these component names are

  1. 74ls = Low-power Schottky
  2. 74hc = High-speed CMOS
  3. 74hct = Best* of both worlds (*sort of), this part is a combination of characteristics of the LS & HC versions.

I found this out here at electronics club worth having a read through this.

You would expect to see very similar performance out of all the variants during general use. You should only notice a difference when comparing the power consumption or the high-speed performance.

Sneaky Puffin
  • 600
  • 2
  • 9