How are system clock and oscillator frequency related?
yes. A square/rectangle wave is required.

not necessarily. For example a base model 8051 microcontroller divides the oscillator frequency by 12. Thus the counter/timer clock is oscillator/12. Compare this with an AVR mega328 - The default internal oscillator is 8MHz and assuming the div8 fuse is not enabled, then the timers can count at 8MHz.

There's always a degree of error - the oscillator might be specified at 8MHz +/- 10% or something more precise might be 8MHz +/- 10ppm (parts per million). The error would affect your timing measurements, so this needs to be factored in.


One example would be for uart communications you generally want better than than 2% timing error. If using the AVR Mega328, the internal oscillator at +/-10% would be unacceptable. Whilst you can trim this value, it is also based on temperature and voltage, so it drifts. An external crystal might be spec'ed at better than 100ppm, so that would be a much better choice with no need for trimming - it would work 'out of the box'.