Author Topic: Confused over SN74LS04 and HD74LS04. They are not compatible.  (Read 10763 times)

0 Members and 1 Guest are viewing this topic.

Offline gmcTopic starter

  • Regular Contributor
  • *
  • Posts: 116
  • Country: gb
I've been pulling my hair out over this one for a while now.
I've been repairing some old retro computers that use a 74LS04 which has gone faulty. I've replaced it with a SN74LS04 which has not fixed the problem (The chip tests fine and I have 10 of them - all done work in this specific computer)

However if I replace it with a HD74LS04 it works.  I though that was just a oddity of the computer. But now I've come across another retro computer (Oric) with exactly the same issue.
Works with a HD74LS04 but not the SN74LS04.

I've been looking through the datasheets but for the life of my I can't find any differences. Same pinout,  both hex inverters.
The only difference is the schematic of the chip and a small difference in the switching characteristics. Would this be enough to cause these issues?

Datasheets:
https://www.ti.com/product/SN74LS04#tech-docs
https://www.electronicoscaldas.com/datasheet/HD74LS04-HD74LS05_Renesas.pdf


On the one computer the inverter is used to generate a 12MHZ clock for the CPU.




HD74LS04 - pin 2 (Working)



SN74LS04 - pin 2 (Doesn't work - Looks like a run away oscillator)



Has anyone come across a issue like this before, or can explain this?

« Last Edit: March 12, 2022, 09:28:25 am by gmc »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5912
  • Country: es
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #1 on: March 12, 2022, 10:02:21 am »
The propagation time might be the issue here.
The HD74LS04 has 15+15ns, but the SN74LS04 has 9+10ns, it's  faster.
Since there're 2 gates in series, the HD had a propagation time of about 60ns, while the SN has 38ns.

Try adding 22pF capacitors between the crystal pins and gnd, does it change anything?
« Last Edit: March 12, 2022, 10:13:56 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #2 on: March 12, 2022, 10:07:09 am »
TTL crystal oscillators are vanishingly rare nowadays and much of the common knowledge about them has been largely lost.

What you've got there is a variant of the capacitor coupled two inverter series resonant oscillator circuit as the low input impedance and relatively low gain of TTL inverters made Pierce oscillators rather difficult to implement reliably.

I'm not at all surprised that it's sensitive to the brand of inverter used as using a TTL inverter as a linear amplifier isn't specified in their datasheets, so yes even the tiny differences you have noted are important.  Although the circuit could be improved to  ensure reliable operation with most brands of 74LS04, as long as you can 'select on test' to find working ICs for it, loosing originality by modifying vintage computers is generally undesirable.  Maybe build a test jiq to aid selecting inverters that work?

You should read Chapter 11 of "Crystal Oscillator Circuits" by Robert J. Matthys, Revised edition: Krieger Publishing Company, 1992, ISBN 0894645528.  It was originally published in 1983 by Wiley, and is out of print in both editions, but PDFs of it are easily Googlable.

Here are a few select quotes:
Quote
In general, TTL does not work too well in an oscillator circuit, because its input resistance is highly nonlinear at the switching point, and it exhibits bad parasitic oscillations if it does not switch rapidly between its two binary output states.
Quote
11.3. TTL TWO-INVERTERS-7404
... Many versions of this circuit are poorly designed; ...
It then goes on to explain the correct biasing and operation of this type of dual inverter series resonant oscillator in some detail, for different series of TTL logic. See: Figure 11.3(c). TTL Two-Inverters (74LS04) circuit, which has very different biasing to your circuit.
 
The following users thanked this post: oPossum, ch_scr, gmc

Offline gmcTopic starter

  • Regular Contributor
  • *
  • Posts: 116
  • Country: gb
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #3 on: March 12, 2022, 10:16:33 am »
Thanks for the information. Very interesting to hear about the TTL oscillator.  At least that would explain why some brand's don't work and some do.

I'll take  a read through the PDF documents and experiment with building/tweaking the circuit.

As you said its probably not a good idea to modify the computer. I'll just buy a few extra HD74LS04 chips to have as spares.

I have 3 of these chips, and all work 100% in the oscillator circuit. So for sure, it's the small change in specs between brands.
 
The following users thanked this post: splin

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11536
  • Country: ch
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #4 on: March 12, 2022, 10:37:11 am »
The propagation time might be the issue here.
The HD74LS04 has 15+15ns, but the SN74LS04 has 9+10ns, it's  faster.
Incorrect, you must have misread the datasheets.

1. You’re comparing the “typ” value from one datasheet to the “max” value of the other.

2. Both datasheets list 9ns/10ns typical, 15ns/15ns max. (The TI datasheet covers multiple logic families, so you have to make sure you’re looking at the tables for the SN74LS04.)
« Last Edit: March 12, 2022, 10:39:01 am by tooki »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11536
  • Country: ch
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #5 on: March 12, 2022, 10:56:13 am »
TTL crystal oscillators are vanishingly rare nowadays and much of the common knowledge about them has been largely lost.

What you've got there is a variant of the capacitor coupled two inverter series resonant oscillator circuit as the low input impedance and relatively low gain of TTL inverters made Pierce oscillators rather difficult to implement reliably.

I'm not at all surprised that it's sensitive to the brand of inverter used as using a TTL inverter as a linear amplifier isn't specified in their datasheets, so yes even the tiny differences you have noted are important.  Although the circuit could be improved to  ensure reliable operation with most brands of 74LS04, as long as you can 'select on test' to find working ICs for it, loosing originality by modifying vintage computers is generally undesirable.  Maybe build a test jiq to aid selecting inverters that work?

You should read Chapter 11 of "Crystal Oscillator Circuits" by Robert J. Matthys, Revised edition: Krieger Publishing Company, 1992, ISBN 0894645528.  It was originally published in 1983 by Wiley, and is out of print in both editions, but PDFs of it are easily Googlable.
Oh man… that book looks fascinating, but what a pity the PDF is so terrible: somebody applied OCR to it which replaces the original bitmap with text, so wherever the OCR got it wrong, the original content is gone. And it did that outside of body text, too, resulting in schematics where traces have been substituted with letters (!), and many areas where images, schematics, or parts of them are simply missing. :(
 

Offline gmcTopic starter

  • Regular Contributor
  • *
  • Posts: 116
  • Country: gb
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #6 on: March 12, 2022, 11:02:08 am »
A very interesting read on IC oscillators, especially the 2 stage 7404 oscillator.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #7 on: March 12, 2022, 11:18:35 am »
The original 1983 Wiley edition isn't unreasonably expensive second hand, so if anyone seriously into 'classic' TTL logic or '80's retrocomputing is interested, they could buy a copy, then do the community a massive favor by scanning it properly.   Regrettably, I'm only a dabbler in those fields and generally avoid increasing my 'dead tree' book collection. 
 
The following users thanked this post: tooki

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1740
  • Country: is
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #8 on: March 12, 2022, 02:26:21 pm »
The values in your computer circuit look a bit 'heavy' for 12mhz duty. The coupling cap is a bit large and the 1K resistors a bit low. Even the circuit itself is slightly different than what is typically used. That circuit looks more proper for the older 4Mhz oscillators.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline gmcTopic starter

  • Regular Contributor
  • *
  • Posts: 116
  • Country: gb
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #9 on: March 12, 2022, 02:28:31 pm »
This is from the schematic from the Oric Computer from the 80's. Not my design  :)
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1740
  • Country: is
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #10 on: March 12, 2022, 02:57:41 pm »
Yes, understood. Looks like they copied and pasted the oscillator from the old 4.77Mhz circuit and plugged in a 12Mhz crystal and were lucky enough to find it was working. I ran into an opposite problem as a bench technician at a Contract Manufacturer. They had an intelligent LED bargraph display to show power and battery status. Out of the first run of a hundred or so about 30% didn't work. Looking at the device with a scope showed it was oscillating on the 5th overtone at 20Mhz!! Here was the killer....When you touched the scope to the oscillator circuit it would go to the fundamental AND stay there until you cycled power!!! We had to solder an extra 22pf capacitor under the board on one leg of the I.C. to a local ground plane to kill the overtone.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: us
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #11 on: March 12, 2022, 03:47:30 pm »
I made a more readable scan of the Matthys book, but it's 13MB, so I can't easily post it here.

Here's a Google Drive link, don't know how long it will last:  https://drive.google.com/file/d/1crclVpDjRq-62Hw4QPWsx8QIsKtrsZA3/view?usp=sharing

Whoops, sorry it's missing chapter 1.  I'm not sure when I'll be able to correct that.  It just gives some historical background.

« Last Edit: March 12, 2022, 06:45:03 pm by edavid »
 
The following users thanked this post: Ian.M, tooki, serg-el, ch_scr, gmc

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11536
  • Country: ch
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #12 on: March 12, 2022, 05:17:25 pm »
Thank you! FYI, though, it’s missing chapter 1.
 

Offline TheHungry

  • Newbie
  • Posts: 8
  • Country: bg
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #13 on: March 12, 2022, 10:35:28 pm »
In all ORIC computers that i have ( include the "ПРАВЕЦ 8Д" clone )  on 12Mhz generator IC is a 74S04 or 74F04 ! If you use 74ls04 this may cause unstable work of computer .

 
The following users thanked this post: gmc

Offline gmcTopic starter

  • Regular Contributor
  • *
  • Posts: 116
  • Country: gb
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #14 on: March 12, 2022, 11:26:54 pm »
Thanks for the info. This is good to know. I've just ordered a few 74S04 chips as well and will try some experiments.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: us
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #15 on: March 13, 2022, 03:06:00 pm »
Thanks for the info. This is good to know. I've just ordered a few 74S04 chips as well and will try some experiments.

You would have to use lower value biasing resistors - 74ALS04 would be a better drop-in upgrade.

Why not try 74HCU04 while you're at it?
« Last Edit: March 13, 2022, 08:10:15 pm by edavid »
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #16 on: March 13, 2022, 04:58:02 pm »
I thought the usual ICs used to make TTL-output oscillator from a standard crystal were the unbuffered variants like 74HCU04.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #17 on: March 13, 2022, 06:20:28 pm »
It's hardly a matter of propagation delays here, as already said above. More to do with the fact the inverters are basically working in their linear region, and the whole circuit is not very tolerant of variations in individual ICs. I bet the manufacturer also had issues back then with some batches of LS04. You could always tweak the values of the resistors and capacitor, but unless you want to keep the circuit 100% original, your best bet would likely be to use a less finicky oscillator circuit. I'd preferably use a single-inverter topology, with a second inverter to buffer the output.

 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14207
  • Country: de
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #18 on: March 13, 2022, 08:54:05 pm »
The usual oscillators have a capacitance to ground at the input gate facing the crystal. The impedance seen at that input is a very important part of the ciruit. The input capacity can vary and is usually not specified very well. The resistor from the feedback in usually not that attracktive, as is dampens oscillation.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #19 on: March 13, 2022, 09:24:21 pm »
There's no easy way to mod the circuit on the mainboard without significant hackery, so perhaps the best option is to design a daughterboard to fit the 74LS04 socket, carrying a SMD 74LS04 if any of its other gates are used and a SMD crystal oscillator module of the correct frequency.  If the other gates aren't used, it will probably need a single gate buffer as well for the clock output pin, or if they are, simply use a spare gate of the SMD '04.  That will leave the original crystal, the feedback resistors and the coupling cap connected in a loop, still connected to the output pin, but as there are no other connections to them, that shouldn't be an issue. No mainboard mods would be required, and it could be reverted by simply refitting a compatible 'LS04 in the socket
« Last Edit: March 13, 2022, 11:10:42 pm by Ian.M »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7742
  • Country: ca
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #20 on: March 13, 2022, 09:38:28 pm »
Something to try:
Try changing the 1k's to 100k and the 74LS04 to 74HC14.
This should allow for a far greater range of tolerance with regards different vendors versions of 74HC14's.  Even 74HC04 should also work, though you may need to add a loading capacitor at the first gate's input.

Moving the crystal from the output of the second inverter to the output of the first inverter may also improve stability at the cost of having a slightly higher output frequency in a few 10s of hertz unless you add loading capacitors.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #21 on: March 13, 2022, 10:02:47 pm »
That modification would need loading caps to work reliably as you would be converting it to a Pierce oscillator.   Also if any of the other four gates are in use and driven by TTL levels, it may cause worse problems unless you add pullups for threshold compatibility.
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #22 on: March 13, 2022, 10:42:55 pm »
There's a copy of the ORIC service manual here http://www.48katmos.freeuk.com/servman.pdf.
The parts list gives the oscillator chip (IC21) as a SN74LS04 with the note 'IC21 must be National'
Maybe the 74S04 or 74F04 were a later mod. Mine are in storage at the moment so I can't check what they have.
Jim
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: us
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #23 on: March 13, 2022, 10:52:01 pm »
Something to try:
Try changing the 1k's to 100k and the 74LS04 to 74HC14.
This should allow for a far greater range of tolerance with regards different vendors versions of 74HC14's.  Even 74HC04 should also work, though you may need to add a loading capacitor at the first gate's input.

Did you mean 74HCU04?  74HC14 should never be used as a crystal oscillator.

 
The following users thanked this post: Bassman59

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Confused over SN74LS04 and HD74LS04. They are not compatible.
« Reply #24 on: March 14, 2022, 03:35:13 am »
There's a copy of the ORIC service manual here http://www.48katmos.freeuk.com/servman.pdf.
The parts list gives the oscillator chip (IC21) as a SN74LS04 with the note 'IC21 must be National'
Maybe the 74S04 or 74F04 were a later mod. Mine are in storage at the moment so I can't check what they have.
Jim

Thanks for that. Those service manuals are always interesting.

Now after reading some of it, I must say though that this particular one is like one of the worst of the kind I've ever read. Even the english in it is relatively poor. But the technical description is not all that great either. Dunno if others share the same opinion.

But back to the topic, it does mention using "National" for IC21 as you pointed out, so as I suspected, they already knew their design was very tolerance-dependant. I think they also mention a modification around that IC, but I didn't bother looking at it too closely. The OP could have a closer look.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf