Clock signal from Atmel ATMega chip
The first shot looks like ringing caused by stray inductance of the ground clip on the probe and/or compensation issues. 16MHz is getting in to the realm where stray L-C becomes an issue in measurement.



From your shot after you compensated the probe, it now starts to look like a bandwidth limited square wave. You can clearly see the first (16MHz) and third (48MHz) harmonics, however the fifth (80MHz) and higher are gone. Having said that, the third looks distorted (more like a second harmonic, which shouldn't be that strong)

This makes sense. Your scope bandwidth is too low to get anything higher than the third harmonic, so it will always look distorted in that way. As for the lack of the fifth harmonic, well you either have bandwidth limiting enabled on the scope, or the bandwidth of the probe is not high enough. Either way it is getting filtered out.

There will also be ringing still from the ground clip inductance which will cause some distortion and may explain the extra distortion beyond bandwidth limiting.



Ground clips cause ringing, it's inevitable. However, you can eliminate some of the issue by removing the ground clip all together and use the alternate ground on the probe.

Usually scope probes have a removable spring tip. Once that is removed, you have the tip of the probe (metal point) and a ring (ground). In order to reduce the ringing, you should connect the metal ground ring (usually an attachment is provided with the probe) to ground as close a possible to the chip ground, and then measure directly on pin 14 with the tip of the probe. This eliminates two wires (the ground and your signal wire) from the measurement path, thus reducing the inductance from the wires and improving measurement results.

The fifth harmonic is almost 50MHz, which is as I say getting quite high - 80MHz for the seventh harmonic is even higher. So careful measurement is required to get good and accurate readings.



As to where the clock signal is coming from, the clock out pin (P14) of the ATMega is a buffered version of the internal clock which comes from the crystal causing an inverter to oscillate at a given frequency.