Embedded Systems & Firmware

When a microcontroller captures many A/D conversion results at regular intervals, what is the advantage of using DMA?

  1. AThe A/D converter's resolution increases automatically
  2. BThe input voltage is amplified automatically
  3. CThe CPU need not read each result in an interrupt; DMA stores them in memory, reducing CPU load
Show answer and explanation

Answer: C. The CPU need not read each result in an interrupt; DMA stores them in memory, reducing CPU load

If the CPU reads each conversion in an interrupt, at tens of thousands of samples per second the interrupt overhead alone consumes much of its time. With DMA, each completed conversion is written in turn into an array in memory, and the CPU is notified only when the array is full. Combined with a timer that triggers conversions, precisely spaced sampling continues without the CPU.

  • A. Resolution is unchanged.
  • B. The voltage is unchanged.
  • C. Correct. The CPU can process the data in batches later.
Practice this topic Back to topic

More Embedded Systems & Firmware questions

  1. When representing peripheral registers with C bit-field structs, what needs care?
  2. On many microcontrollers, what is the advantage of declaring a large table that never changes (such as font data) as const?
  3. What can be done through debug interfaces such as JTAG and SWD?
  4. You want to run a control calculation every 1 ms on a microcontroller without an OS. Which implementation is most suitable?
  5. What is the role of a microcontroller's brown-out detector (BOD, brown-out reset)?