Maker Pro
Maker Pro

74HC logic output signal

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
Hi,

I'm not new to electronics, been doing it on and off for about 40 years, but I am new to owning an oscilloscope. I used to experiment with 74 series chips in the late 70s when they were real TTL but I never saw what they did on a scope. All my projects (which were quite simple) worked fine. I also used 74HC chips 'unknowingly' about 20 years ago and that project worked fine too. I had no scope and just assumed all the signals were square waves. That project (a clock) ran at about 1Hz.

So, now I have a scope and recently I've been testing some 74HC series chips on a breadboard and I'm troubled by the output signal I'm seeing (attached). Specifically, I have a 1MHz quartz oscillator (MX045 metal package) whose output is connected to the clock input of a 74HC163 counter. I attached my scope to the Q output that gives a divide by 4 and results in a 250kHz square wave output. Well, at least I expected a square wave, but I'm getting a 'ringing' on the edges and some little spikes inside the wave. I have used a 0.1uF bypass capacitor and have tried to keep all the wires short. The supply is 5 volts.

After some reading (a lot of reading) I understand that this ringing is caused by reflections in the wire which are worse at high frequencies and happen more in modern CMOS devices that have fast switching. What worries me is the max and min voltages that the scope shows: 5.75 and -1.28 respectively. While fiddling around at one point I saw +8 volt maximum. That went away when I made the wires shorter and connected the scope ground closer to the chip. It worries me that this voltage is so high it will damage the chips. I'm also worried that when I build up my project with more chips, this effect will spread and stop the project from working at all. Am I over-thinking this and worrying about nothing? In all the searching I have done I can't find anyone saying that this is OK or not OK. It's like everyone seems to ignore it except when discussing long transmission lines -- but all my wires are short.

As an afterthought, could this be caused by the act of trying to measure the wave? I may not be using the scope correctly. I calibrated the probe with the trimmer tool and set it to 10x as described in the manual.

Thanks for any advice you can give.

John

DS1Z_QuickPrint18.png
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
Yeah, you're probably seeing a combination of a number of things.

1) Ringing - pretty much as you suggest, it is caused by distributed capacitance and inductance in the circuit. You're correct that it is possibly exacerbated by the scope lead. Having done the scope probe compensation should minimise this.

2) Switching transients - It looks to me that you're seeing several regular transients. By any chance are you getting this 1MHz signal by dividing a 4MHz signal*? When CMOS switches it draws significant current. This causes transients, and I can see transients that seem to correspond to a higher switching frequency than that of the square wave. bypass capacitors are the general fix for this. These need to be wired in a manner that minimises inductance. This generally means across the power supply pins with the shortest leads possible. Have you fitted these to all ICs? * -- yeah, you said 250kHz from 1MHz.

3) Reflections - however these are more likely to produce unusual step transients in your signal, however if you've made this on a breadboard or veroboard you may have created a whole series of these with all sorts of odd effects.

4) bandwidth limitations - Although the frequency of the square wave is only 250kHz, the rising edge is fast and almost certainly exceeds the bandwidth of the scope. This can result in overshoot and ringing although you normally see rounded corners on your square wave.

This and this are worth reading.
 

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
Hi Steve,

Thanks for your reply. Yes, I have a bypass capacitor on both the oscillator device and the counter IC. The 1MHz signal comes straight from the oscillator. I think that's what the little spikes are, but I don't really understand why I'm seeing them when I have the bypass caps fitted. The scope is only 70MHz but I didn't think that would matter. Seems it might.

After I posted the original message, I tried changing the scope probes to 1x. I don't know why I never considered that before. Doing that greatly improved the result - it's now a square wave with a tiny bit of wiggle along the top and bottom. But now I don't know if that is real or the scope is lying to me.

Thanks for the links - I'll definitely read them after I get some sleep!

Thanks again,

John
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
when set to 1X, the bandwidth of the scope is going to be significantly less. That would explain the cleaner looking signal.

how are the caps fitted and what is your construction method?

does it get worse if you remove them?
 

shrtrnd

Jan 15, 2010
3,826
Joined
Jan 15, 2010
Messages
3,826
Put a 300Mhz scope on that signal, and you're going to be shocked at what you see.
The jitter alone will make you rethink everything you think you know.
*steve* only gives accurate information, so you can take what he says to the bank.
My input here, is that all test and measurement equipment have limitations, those sometimes being oversensitivity.
Sometimes what you can see, is not all that critical to circuit performance.
Some high speed circuits require precise attention to circuit operation. I don't know what your application is.
I just wanted to make you aware of the fact that if you're delving into the critical high-speed applications, your 70mhz scope is old-school.
But if you're doing simple 74HC applications, don't sweat the overly-precise readings.
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
The appearance of spikes at the clock frequency on an otherwise steady signal would indicate that the noise is on the power/ground lines. More/better decoupling is needed. Are your bypass capacitors the multi-layer ceramic RF type capacitors? Keep leads as short as possible and try to emulate a ground plane with the ground wiring.
 

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
Thank you all for your replies. This is currently on a breadboard and it's a bit of a mess as it's just a test. That could partly be the problem. The bypass caps are just some I had lying around; I think they're ceramic. I'll post a pic of the board. I tried removing the bypass caps. The oscillator one made no difference, but removing the cap from the counter chip made the signal absolutely horrible. I have always been careful to fit those things on all my circuits and I'm glad I did.

My project is a custom 'old school' computer which I'm hoping to run at 1 to 4MHz. Is that considered 'high speed'? Probably not by today's computer standards. When I read about 'high speed' design I don't know what they mean by 'high speed'. I think anything is high speed if I can't see the LEDs flashing ;)

The scope is new and at the time I chose 70MHz because 1. it was all I could afford and 2. I usually only do audio (synth) projects. This computer thing was a just a sudden idea I had and I wanted to have a play around with it.

I think the thing that troubled me the most is that I see lots of computer circuits online and I've seen computer boards full of 74 chips, and everything works fine just by having all the chips connected together with traces or short wires. I got confused because people were saying that one can control these problems using resistors / capacitors and I couldn't understand why I never saw those on other people's computer boards. Apart from bypass caps, I don't think I should need any caps on a pure logic board, should I? I understand things get very different if one runs long wires between boards, but that's not what I'm looking at here.

Thanks again!

John

bb.png
 

shrtrnd

Jan 15, 2010
3,826
Joined
Jan 15, 2010
Messages
3,826
I'm thinking that your 70MHz scope is overkill for this project, and that you're fine.
When I went from a 100MHz Scope to a 300MHz one, all the detailed stuff that was always there, suddenly became visible when I had never seen it before.
Worried the heck out of me. I thought my circuit went bat-*hit all of a sudden.
I'm sure somebody on this site will correct me if I'm in error. There are some pretty smart guys here, and you'll find yourself very happy that you found us here for input.
Keep ElectronicsPoint in mind when you've got information to ask, or share with us.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
I suspected it was some sort of prototype layout :)

I'm not sure what shirt of oscillator you have used, but several designs will have the signal passing through the transition region comparatively slowly. This both reduces the amount of high frequency noise generated (due to the slower switching tune) and makes life harder for following logic of the output is not cleaned up so it has faster rise and fall times.

In addition to that, the counter will have many more gates and thus generate more noise.

All the advice given to you advice given to you above is good (aside, perhaps, any impression that I am infallible!)

CMOS has wide noise immunity, so even what you're saying is no immediate cause for concern, however as your circuit gets larger you'll have to keep an eye on it.

If you have the resources, try creating a PCB filtering good practice (we can help) and measure the signals again.
 

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
Thanks again everyone. Every bit of information helps me to understand this stuff better. The oscillator is this:

http://www.ctscorp.com/components/Datasheets/008-0258-0.pdf

I will definitely keep an eye on the situation as the circuit gets bigger. I'm not sure what you mean by "PCB filtering". I am planning to make this for real on a solder-pad board. This one, in fact:

http://tinyurl.com/pym3qnd

I did look into getting a real PCB made but I couldn't justify the extra expense. Also, using a proto-board allows room for experimentation.

John
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
"filtering" appears to be an autocorrect of "using".

For some reason your link to the board doesn't work for me.

I see you're using an oscillator module. They're pretty week designed, have good rise and fall times, and I'm not totally surprised that a cap across the power supply does little.
 

Merlin3189

Aug 4, 2011
250
Joined
Aug 4, 2011
Messages
250
Just like to add to Shrtnd's comment. I was amazed when I started looking at digital computer signals on a scope - so much noise and shapes that looked anything but "square".
But what you have to remember is that for TTL, zero is anything below 0.8V and high is anything above 2.2V . As long as it doesn't spend too much time in between, it can do what it likes above or below those limits.

The trace you show is very good, because it's a slow clock and you're looking at a very simple circuit.

I wouldn't worry about the ringing voltages. Obviously if you have inductive loads, you need to take normal precautions, but resistive, capacitive and other gate inputs will damp these ,even if they're really there now.
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
I don't think you have anything to worry about. Besides other considerations, on a breadboard it's hard to get the bypass caps close enough to the actual pins of the ICs. Just ensure that when you build the final circuit, the bypass caps are directly across the supply pins, even if that means putting them on the underside of the board.

On an aside, you can fairly easily make your own custom PCBs without going to the expense of having them commercially manufactured, especially with pre-sensitised positive-acting blank PCBs.
See here:- http://kinsten.co

I don't use a factory-made UV exposure light, just a pair of 24" fluorescent UV tubes, (90 second exposure), and get perfect results. Everything else is relatively cheap. (For developer, I use caustic soda crystals in water at 1g per litre, rather than the more expensive commercial developer.) For etchant, being 'old-school' like yourself, I use Ferric Chloride but most people use ammonium persulphate these days with good results.
 

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
Thanks for the encouraging comments. So 1MHz is considered 'slow' these days? I always thought of MHz as high-speed so I thought I was going to run into trouble.

When I was about 17 I did make my own PCB using ferric chloride but I couldn't drill it. I spent all my pocket money on components and never had any money left for tools or enclosures:( I had to solder the components onto the copper side. I guess this was an early form of surface mounting :cool:

I did look into etching my own, and there are some very good videos on YouTube that show how, but I decided in the end to just go with a simple pad-board. Mostly because this circuit is going to be pretty complex and I want to be able to make adjustments if I've made a mistake in the design. Perhaps I'm just finding excuses to not go the the trouble of dealing with chemicals. I know it would be super-cool (and probably perform better) -- but I've already bought the pad boards :rolleyes: Maybe if there's a Mark II and I really know what I'm doing, I'll try etching my own. I have to admit, it would be fun.

As for the bypass caps, my idea is to solder them onto the reverse of the board, diagonally across the power pins. I don't think you can get much closer than that. I often wonder why the chip designers decided to put the power pins as far apart as physically possible. Why didn't they put them right next to each other? An ideal place would have been pins 1 and 14 (or 16 etc) so a bypass cap would be standing right at the end with very short leads.

John
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
.....Mostly because this circuit is going to be pretty complex and I want to be able to make adjustments if I've made a mistake in the design.

Yep. I'm with you on this. I (stupidly) got the pins of a comparator backwards the other day, and had to butcher the PCB to avoid re-making it correctly. (A one-off.) See pic below.
WPIRRX_sml.JPG WPIRRX_sml.JPG

An ideal place would have been pins 1 and 14 (or 16 etc) so a bypass cap would be standing right at the end with very short leads.
John
Or even better, pins 1&2.
 

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
What a shame! That's exactly the kind of thing I'm afraid of doing myself. That and forgetting I needed an entire 8-bit buffer or something with no room to hack it on :eek:

John
 

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
Believe me, I'm still kicking myself for making such a silly mistake. The result was that the power to the circuit was cut off when the battery was fully charged, and connected when the battery went flat. :rolleyes:
In my defense, like you it's been years since I last did any electronic design. I'm just getting back into it over the last few weeks. We live and learn. ;)
 

TedA

Sep 26, 2011
156
Joined
Sep 26, 2011
Messages
156
John,

How was your scope probe grounded? For sure, you can't omit the ground wire from the probe to your circuit, and the short ones work better than longer ones.

If you can, clip it right onto the Vss lead of the bypass cap on the CMOS part you are observing.

Sometimes it's instructive to probe the ground connection, and see how much garbage you see there.

A good clear photo of your circuit and scope connections might let us better see what you are doing.

The white plastic breadboard where you plug all the parts into little holes are not the best for faster circuits, and can lead to much head scratching. But, usually, TTL speed circuits on them will work. For analog, if you are using an NE555, an LM324 or LM339, perhaps a uA741, the breadboard is in its element.

I presume that this is a hobby pursuit, and the actual hobby might be making printed circuit boards. But, if you are more interested in electronics, and less in PCB fab, you might investigate building your one-offs using "dead bug" methods.

Ted
 

croudyj

Aug 19, 2015
8
Joined
Aug 19, 2015
Messages
8
Thanks, Ted. At first the probe was grounded far away and I realized that was bad and actually did clip it right onto the bypass cap. If you scroll up you can see a picture of the circuit as it was. I have now changed the breadboard as I'm working on something else.

Yes, it's just my hobby and I'm not planning to do PCBs for this. Is 'dead bugs' where you lay the chips on their backs and wire-wrap them? I thought that was pretty clever but I'm going to stick to my familiar way of soldering onto a proto-board. I bought some good quality ones with a ground plane around the edge. Still haven't got to that stage though; I'm still drawing the schematics and don't plan to solder anything until I have drawn and checked all of them.

John
 
Top