New: AI Part GeneratorFree to get started

Clocks & timing

Lesson 22 of 411 min read

A clock is a steady square wave that paces a digital system. On each tick, usually the rising edge, every flip-flop in the design captures its input at once, and the results ripple through the logic in time to be captured on the next tick. The clock is the metronome that turns a pile of gates into an orderly sequence of steps.

That’s why chips advertise speed in hertz: a 100 MHz clock means one hundred million update steps per second. The clock can only run as fast as the slowest path between flip-flops, though. Signals need time to travel and gates need time to settle before the next edge arrives. Data also has to be stable slightly before and after each edge (setup and hold time), or the captured value can’t be trusted.

Clock quality matters as much as speed. Digital timing traces back to a crystal or oscillator, and communication between devices assumes both sides agree about time. A microcontroller running a serial port from a sloppy internal RC oscillator can drift far enough to corrupt bytes. That’s one of the classic reasons an external crystal earns its spot on the board.

Key points

  • The clock synchronizes a digital system. Every flip-flop updates on the same edge.
  • Maximum clock speed is set by the slowest logic path between storage elements.
  • Setup and hold: data must be stable around the clock edge to be captured reliably.
  • Accurate clock sources keep timing and serial communication trustworthy.

Practice

0 of 2 answered · Not started

Wrong answers just let you try again, and hints are there if you want them. Answering every question first time, without hints, is what earns mastery.

  1. 1

    What does setup time require?

  2. 2

    What is clock skew?