1 of 6

09: Clocks and Timers/Counters

(timer rollover)

Post project ideas on Ed

You can also come to office hours to brainstorm ideas

2 of 6

Today

Where we’ve been:

I/O Peripherals, interrupts, embedded architecture

Where we’re going:

Time - clocks, timers, watchdogs

2

3 of 6

Keeping track of time: clock signals

Square wave of a set frequency

Basis of control of a CPU/MCU

On MCU: multiple clocks signals common

Physical oscillators (vibrating crystals, often) act as sources of clock signals (configurable; fig 8.1)

3

4 of 6

What can a CPU/MCU do with a clock signal?

Challenge mode: why does an ADC need a clock signal?

4

5 of 6

ADC needs clock signal to know when to take each iteration

delay(200)

interrupts

communication protocols

5

6 of 6

Timing Diagrams

6