โ† Microprocessors & Microcontrollers learning path
Microprocessors & Microcontrollers ยท Module 9 of 10

Timers, serial and peripherals

Generating delays, counting and communicating.

๐Ÿ“– Key ideas

  1. Timers count clock pulses to create delays, measure time or generate PWM.
  2. PWM (pulse width modulation) controls motor speed and LED brightness by varying duty cycle.
  3. Serial protocols: UART (2 wires, asynchronous), I2C (2 wires, addressed devices), SPI (4 wires, fast).
  4. ADCs read analog sensors; resolution is set by bits, for example 10-bit gives 1024 levels.
  5. Watchdog timers reset the chip if the program hangs.
๐Ÿ’ก Real-life example: PWM is like flicking a light switch very fast: the longer it stays on in each cycle, the brighter the room seems.
PWMVarying duty cycle to control average power
I2CTwo-wire bus for addressed devices
SPIFast four-wire serial bus
Watchdog timerResets the chip if software hangs