STAGE 03 OF 5

Interacting with Hardware

Pins, time and events: driving and reading GPIO, keeping time with hardware timers, and letting the hardware interrupt the program instead of the program waiting on the hardware.

3 units18 of 18 lessons available

Digital Input and Output

Pins that read, drive and survive the real world.

  1. Pin Modes and Alternate Functions
  2. Push-Pull and Open-Drain Outputs
  3. Reading Inputs and Handling Floating Pins
  4. Debouncing Buttons and Switches
  5. Driving Loads and Protecting Pins
  6. Designing a Nonblocking Input-Output Loop

Clocks and Timers

Every microsecond, counted by hardware.

  1. Clock Sources, Dividers, and Clock Trees
  2. Counters, Prescalers, and Timer Periods
  3. Measuring Elapsed Time and Handling Wraparound
  4. Periodic Events and Output Compare
  5. Measuring Pulses with Input Capture
  6. Pulse-Width Modulation and Duty Cycle

Interrupts and Events

React to the world the moment it changes.

  1. Polling, Interrupts, and Events
  2. Interrupt Requests and Handler Execution
  3. Latency, Priorities, and Nesting
  4. Acknowledging and Clearing Interrupt Flags
  5. Sharing Data with Interrupt Handlers
  6. Deferring Work and Keeping Handlers Short