Embedded Systems & Firmware

What is the main purpose of using a microcontroller's sleep mode in a battery-powered embedded device?

  1. ATo increase processing speed
  2. BTo stop the CPU and clocks when idle to cut power, waking only when needed, for example on an interrupt
  3. CTo erase the program
Show answer and explanation

Answer: B. To stop the CPU and clocks when idle to cut power, waking only when needed, for example on an interrupt

A device that reads a sensor once every few seconds has nothing to do most of the time. Sleep mode stops the clocks or power to the CPU and unused peripherals, cutting the current; in deep sleep, some microcontrollers draw only microamperes or less. A timer or pin-change interrupt wakes it, and it goes back to sleep as soon as the work is done. Deeper sleep draws less current but takes longer to wake and loses more state.

  • A. It is not for speed.
  • B. Correct. Battery life improves greatly.
  • C. The program is not erased.

Related calculators

Books on Embedded Systems & Firmware Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

More Embedded Systems & Firmware questions

  1. A sensor device runs at 10 mA for 1% of the time and sleeps at 10 µA for the remaining 99%. What is the closest average current?
  2. Why does firmware on small microcontrollers often avoid dynamic memory allocation such as malloc?
  3. On a small microcontroller without an MMU, what should be kept in mind about excessive stack use?
  4. A 12-bit A/D converter with a 3.3 V reference reads a value of 2048. What is the closest input voltage?
  5. When a microcontroller captures many A/D conversion results at regular intervals, what is the advantage of using DMA?

Comparisons in this topic