ADCs, DACs & serial buses
The physical world is analog, so every digital system needs translators at its edges. An ADC (analog-to-digital converter) measures a voltage and outputs a number. A DAC does the reverse. An ADC’s resolution is its step count: 10 bits divides the measurement range into 1024 steps, 12 bits into 4096. Its sample rate is how often it measures. Temperature sensing needs a few samples a second; audio needs tens of thousands.
Chips also need to talk to each other, and three serial buses cover most of it. UART is the simple veteran: two wires, point to point, both sides agreeing on a speed in advance. I2C runs a whole network of addressed devices over just two shared wires. It’s slow, but very cheap on pins. SPI is fast and full-duplex, with a dedicated select line for each chip.
Choosing between them is a pins-versus-speed trade you’ll make constantly. I2C suits scattering low-speed sensors around a board. SPI handles displays and flash memory that move real data. UART covers debug consoles and modules like GPS or Bluetooth. A logic analyzer that decodes all three is one of the best debugging tools you can buy for embedded work.
Key points
- ADCs turn voltages into numbers, and DACs turn numbers into voltages.
- Resolution (bits) sets measurement fineness: 12 bits means 4096 steps across the range.
- UART is simple point-to-point. I2C shares two wires among addressed devices. SPI is fast with one select per chip.
- Pick by trade-off: I2C saves pins, SPI moves data fast, UART talks to modules and consoles.
Practice
0 of 2 answered · Not startedWrong 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
What sets the smallest voltage step a 12-bit ADC can resolve?
- 2
Which bus uses two wires shared by many devices, each with its own address?
