# How to accurately measure 16MHz clock with Oscilloscope

Electrical Engineering Asked by Moisés Pacheco Gendrop on September 10, 2020

I have a small problem trying to make a 16 MHz signal with a scope with 100 MHz 1 GS/s. I can’t seem to be able to read the square wave from the MCU clock, see results on the attached picture.

I calibrated the probe with the 1 kHz built in square wave on the oscilloscope.

Also, I can see that if I output the clock signal with a prescaler of 5, i.e. a frequent of 3.2MHz then I am able to read a signal that looks more like a square signal.

I’m not sure what I might be missing or doing wrong.

I’m using the STM Nucleo F410RB development board.

@KevinWhite has given the correct solution.

Analysis. The underdamped square wave indicates peaks every 2/5 in 1cm at 50ns per cm=division approx. thus 40ns cycle = 25MHz resonance. This is common with long ground lead inductance 0.5~1nH/mm and special coax used in 10:1 probe < 90pF/m. The computed resonance is dependant on the length of the ground lead inductance. Thus to expect an increase in resonant frequency requires better impedance matching of the probe 10RC+L : 1RC ratio by reducing the L value. This raises resonant frequency by inverse square root (LC), so to raise 25MHz to 200Mhz 1:8 requires reducing the ground lead length by a factor of 64 down to ~5~10mm from (est. = ) 160~320mm supply or ground lead length including probe ground path length on cct board gnd location. So I predict your probe ground lead was too long and also calibration imperfect.

Conclusion: use ground pad or test points directly at IC. Ensure Vdd,Vss is decoupled by at least 10nF directly at IC. As these also add path inductance to Zout.

Also consider CMOS output impedance ~ 50 Ohm +/-50% from RdsOn is also mismatched and further improvement can be made by examining all stray loads of breadboard wiring to output. (L,C)

P.s. 25MHz probe resonance is pretty common and this is another reason why all DSO’s have 20MHz LPF with amateur 10:1 probes.

Answered by Tony Stewart Sunnyskyguy EE75 on September 10, 2020

Your oscilloscope photo indicates that you are able to measure the MCU clock at 16 MHz quite nicely.

You should be using a "10X" probe. It will add some capacitance to the MCU oscillator, which will likely shift its frequency lower. If the MCU oscillator has an input pin and an output pin, probe the output pin.

Your OWON oscilloscope has a time-base accuracy of $$pm100$$ parts-per-million. If you need more accuracy, measure frequency with a frequency counter instead...a decent frequency counter should contain a more accurate time base.

Your OWON 'scope has an internal counter claiming 6-digit resolution. If this internal counter uses the main timebase (having accuracy of 0.01%) then its least-significant digits are suspect.

From the OWON SDS1102 manual:

Counter:
It is a 6-digit single-channel counter. The counter can only measure the frequency of the triggering channel. The frequency range is from 2Hz to the full bandwidth. Only if the measured channel is in Edge mode of Single trigger type, the counter can be enabled. The counter is displayed at the bottom of the screen. Operation steps:

• 1.Push Trigger Menu button, set the trigger type to Single, set the trigger mode to Edge, select the signal source.
• 2.Push the Acquire button to show the right menu.
• 3.Select Counter as ON or OFF in the right menu.

Answered by glen_geek on September 10, 2020

The shape of the waveform won't affect the fundamental frequency of a signal. However an oscilloscope is usually not the correct instrument to accurately measure frequency. It may only have an accuracy of 1% or so.

As @glen_geek points out in his answer some oscilloscopes do have counter/timers built into the instrument that can give high-accuracy (typically only for a single chanell) but the frequency displayed using the normal measurement facilities are usually only obtained after the signal is sampled and so will not be as accurate.

If you want to measure the frequency accurately and your scope does not have a built-in frequency counter you will need a frequency counter/timer such as [Keysight 53230A 350 MHz Universal Frequency Counter1

The wave shape distortion you see is almost certainly because of your probing technique. The probe should have an extremely short ground - a couple of inches is too long. Your oscilloscope probe accessories will probably contain some small springs that are used for this purpose.

To get the best waveform I don't use a probe and instead use coax wired directly to the signal. with very short connections.

If the source cannot drive a coax cable directly a 470 or 910 ohm resistor at the probe point can make an ad-hoc 10:1 or 20:1 attenuator with very good frequency response (up to a few GHz). Set the oscilloscope to 50 ohm input impedance if using this approach.

Answered by Kevin White on September 10, 2020

## Related Questions

### Preventing long-press button function on DFPlayer board

1  Asked on December 19, 2020 by michael-reilly

### How adding a capacitor reduces the signal gain to 1 in an op-amp?

1  Asked on December 18, 2020 by srikrishna-jana

### Half-wave rectifier with resistor and inductor load

2  Asked on December 18, 2020 by edwin-vargas

### Sprintf() function bricked Arduino Nano?

2  Asked on December 18, 2020 by dragos-spiridon

### Regarding plugging operations

1  Asked on December 18, 2020 by kamola

### Head to tail transistor pair, not a Darlington pair, not a Szlikai Darlington

1  Asked on December 18, 2020 by tioneb

### Debugging Signal Distortion/Oscillation

1  Asked on December 18, 2020 by cdevelop

### How to avoid input floating ports on a microcontroller?

4  Asked on December 18, 2020 by dean

### Measure voltage of motorcycle battery which varying voltage

2  Asked on December 17, 2020 by cremus

### How to make sure a clocked operation happens just once in Vhdl

1  Asked on December 17, 2020 by runo

### Can a MOSFET work upside-down?

2  Asked on December 16, 2020 by user253751

### Three phase AC power measurement

2  Asked on December 16, 2020 by bud

### How to “clean” a DC brushed motor : noise on CANbus even without moving!

0  Asked on December 15, 2020 by voltsandnuts

### Am I using this LM393A comparator incorrectly?

2  Asked on December 15, 2020 by ttbulaski

### Why does the voltage value on the RESET pin of my microprocessor not go high?

1  Asked on December 15, 2020 by ninjagreg

### How are the connections made to the driver module as shown in the figure below

0  Asked on December 14, 2020 by amit-nikhade

### Bonding yourself via oscilloscope GND?

1  Asked on December 14, 2020 by manuel

### Would a ground plane/traces impact NFC antenna performance?

1  Asked on December 14, 2020 by yonatan-avhar

### Thermal compound for Alumina Ceramic Insulator

2  Asked on December 14, 2020 by uk25

### Opto-isolation amplifier giving no output

3  Asked on December 13, 2020 by nchaud

### Ask a Question

Get help from others!