PadhaikoAll subjects

Microcontrollers (Atmega328, STM32): Architecture, pin configuration…

Instrumentation (ENEX 252)

Open in the Padhaiko app

4.3 Microcontrollers (Atmega328, STM32): Architecture, pin configuration, and their application

Over the past two decades, instrumentation engineering has transitioned from multi-chip microprocessor boards (such as the 8085 with external 8255 PPIs) toward self-contained microcontrollers (MCUs). In modern measurement and control systems, two microcontroller families dominate:

  1. ATmega328P (AVR Architecture): An 8-bit RISC microcontroller celebrated for its simplicity, deterministic instruction timing, widespread adoption in Arduino hardware, and ease of hardware interfacing.
  2. STM32 (ARM Cortex-M Architecture): A 32-bit high-performance, energy-efficient microcontroller family developed by STMicroelectronics, delivering advanced digital signal processing (DSP), high-speed multi-channel data conversion, and complex networking.

4.3.1 ATmega328P microcontroller

The ATmega328P is a low-power, CMOS 8-bit microcontroller based on the enhanced AVR RISC architecture developed by Atmel (now Microchip Technology).

Definition

ATmega328P Microcontroller

The ATmega328P is an 8-bit AVR RISC microcontroller featuring an advanced Harvard architecture, 32 general-purpose 8-bit working registers directly connected to the Arithmetic Logic Unit (ALU), single-cycle instruction execution, 32 KB of on-chip In-System Programmable Flash memory, 2 KB of SRAM, 1 KB of EEPROM, and integrated mixed-signal instrumentation peripherals.

Architecture of the ATmega328P

The internal structure of the ATmega328P centers around a high-throughput AVR CPU core:

ATmega328P Internal Block DiagramText
+---------------------------------------------------------------+
|                    ATmega328P 8-BIT AVR MCU                   |
|                                                               |
|  +-------------------+  Data Bus (8-bit)  +----------------+  |
|  | Flash ROM (32 KB) |<==================>|  SRAM (2 KB)   |  |
|  | Program Counter   |                    +----------------+  |
|  +-------------------+                    | EEPROM (1 KB)  |  |
|           | Instruction Bus (16-bit)      +----------------+  |
|           v                                        ^          |
|  +-------------------+                             |          |
|  | Instruction Reg & |                             |          |
|  |      Decoder      |                             |          |
|  +-------------------+                             |          |
|           |                                        v          |
|           v                             +------------------+  |
|  +-------------------+                  | 32 x 8 General   |  |
|  |    Control Lines  |                  | Working Regs     |  |
|  +-------------------+                  | (R0 - R31)       |  |
|           |                             +------------------+  |
|           |                                      |            |
|           +--------------+   +-------------------+            |
|                          v   v                                |
|                        +-------+                              |
|                        |  ALU  |                              |
|                        +-------+                              |
|                            | Status Register (SREG)           |
|                            v                                  |
|  +---------------------------------------------------------+  |
|  |                 ON-CHIP PERIPHERALS                     |  |
|  |  * 10-Bit ADC (6 Channels, SAR)                         |  |
|  |  * Timers: Timer0 (8-bit), Timer1 (16-bit), Timer2      |  |
|  |  * 6 PWM Channels                                       |  |
|  |  * Communication: USART, SPI, I2C (TWI)                 |  |
|  |  * Analog Comparator, Watchdog Timer                    |  |
|  |  * GPIO: Port B (PB0-PB7), Port C (PC0-PC6), Port D    |  |
|  +---------------------------------------------------------+  |
+---------------------------------------------------------------+

Key architectural highlights include:

Pin configuration of ATmega328P (28-Pin PDIP)

The ATmega328P is housed in a standard 28-pin plastic dual-in-line package (PDIP):

ATmega328P 28-Pin PDIP Pinout DiagramText
                         +---v---+
      (RESET / PCINT14) PC6 | 1   28 | PC5 (ADC5 / SCL / PCINT13)
        (RXD / PCINT16) PD0 | 2   27 | PC4 (ADC4 / SDA / PCINT12)
        (TXD / PCINT17) PD1 | 3   26 | PC3 (ADC3 / PCINT11)
       (INT0 / PCINT18) PD2 | 4   25 | PC2 (ADC2 / PCINT10)
  (INT1 / OC2B / PC19) PD3 | 5   24 | PC1 (ADC1 / PCINT9)
       (XCK / T0 / PC20) PD4 | 6   23 | PC0 (ADC0 / PCINT8)
                        VCC | 7   22 | GND
                        GND | 8   21 | AREF
 (XTAL1 / TOSC1 / PC6) PB6 | 9   20 | AVCC
 (XTAL2 / TOSC2 / PC7) PB7 | 10  19 | PB5 (SCK / PCINT5)
   (T1 / OC0B / PC21) PD5 | 11  18 | PB4 (MISO / PCINT4)
 (AIN0 / OC0A / PC22) PD6 | 12  17 | PB3 (MOSI / OC2A / PCINT3)
        (AIN1 / PC23) PD7 | 13  16 | PB2 (SS' / OC1B / PCINT2)
       (ICP1 / PCINT0) PB0 | 14  15 | PB1 (OC1A / PCINT1)
                         +-------+
Functional Pin Assignments of ATmega328P
Pin NumberPrimary NameAlternative / Shared FunctionsDescription in Instrumentation
1PC6, PCINT14Active-low reset input; pulling low resets the MCU.
2, 3PD0, PD1RXD, TXD, PCINT16, PCINT17Hardware USART receive and transmit serial data lines.
4, 5PD2, PD3INT0, INT1, OC2B, PCINT18, PCINT19External hardware interrupt inputs (edge or level triggered); PD3 also outputs Timer2 PWM.
6PD4T0, XCK, PCINT20External counter input for Timer0 / USART external clock.
7, 8VCC, GNDDigital Supply, GroundDigital power supply (, typically ) and digital ground.
9, 10PB6, PB7XTAL1, XTAL2, TOSC1, TOSC2Connections for external crystal oscillator (typically 16 MHz).
11, 12, 13PD5, PD6, PD7T1, OC0B, AIN0, OC0A, AIN1Timer1 external clock; Timer0 PWM outputs; Analog comparator inputs.
14PB0ICP1, PCINT0Input capture pin for 16-bit Timer1 (used for precise frequency/period measurement).
15, 16PB1, PB2OC1A, OC1B, 16-bit Timer1 PWM outputs; PB2 serves as SPI Slave Select.
17, 18, 19PB3, PB4, PB5MOSI, MISO, SCKSerial Peripheral Interface (SPI) master/slave bus lines; PB5 is wired to the Arduino on-board LED.
20AVCCAnalog Supply VoltagePower supply for the ADC converter; must be connected to via an LC low-pass filter ( of ).
21AREFAnalog Reference PinExternal analog reference input for the 10-bit ADC converter.
22GNDAnalog / Digital GroundCommon ground return path.
23–28PC0–PC5ADC0–ADC5, SDA, SCL6 analog ADC input channels; PC4 is Data (SDA), PC5 is Clock (SCL).

4.3.2 STM32 microcontroller family (ARM Cortex-M)

The STM32 family, manufactured by STMicroelectronics, is a 32-bit microcontroller ecosystem built around ARM Cortex-M processor cores (Cortex-M0, M0+, M3, M4, M7, and M33).

Definition

STM32 Microcontroller Family

STM32 is a family of 32-bit Flash microcontrollers based on ARM Cortex-M processor cores designed for embedded real-time systems. They feature 32-bit RISC processing, multi-stage instruction pipelines, hardware floating-point acceleration, multi-channel high-speed 12-bit/16-bit ADCs, direct memory access (DMA) controllers, and advanced connectivity peripherals (USB, CAN, Ethernet).

Architecture of STM32 (ARM Cortex-M Core)

STM32 (ARM Cortex-M) Architectural TopologyText
+---------------------------------------------------------------+
|                    STM32 32-BIT MICROCONTROLLER               |
|                                                               |
|  +---------------------------------------------------------+  |
|  |                 ARM CORTEX-M CPU CORE                   |  |
|  |  * 32-bit RISC Core with 3-Stage / 5-Stage Pipeline     |  |
|  |  * Hardware FPU (Single/Double Precision IEEE 754)      |  |
|  |  * DSP Instructions: Single-Cycle MAC (32x32 + 64 -> 64)|  |
|  |  * NVIC (Nested Vectored Interrupt Controller)          |  |
|  |  * MPU (Memory Protection Unit) & SysTick Timer         |  |
|  +---------------------------------------------------------+  |
|            | I-Bus         | D-Bus         | S-Bus            |
|            v               v               v                  |
|  +---------------------------------------------------------+  |
|  |                 MULTI-LAYER BUS MATRIX                  |  |
|  +---------------------------------------------------------+  |
|       |               |               |              |        |
|       v               v               v              v        |
|  +----------+   +-----------+   +-----------+  +-----------+  |
|  |  Flash   |   |   SRAM    |   | DMA Contr.|  | Periph    |  |
|  | (Up to   |   |  (Up to   |   | (Channels |  | Bridges   |  |
|  |  2 MB)   |   |  512 KB)  |   | 1 & 2)    |  | (APB/AHB) |  |
|  +----------+   +-----------+   +-----------+  +-----------+  |
|                                                      |        |
|       +----------------------------------------------+        |
|       v                                                       |
|  +---------------------------------------------------------+  |
|  |                 PERIPHERAL SUBSYSTEMS                   |  |
|  |  * High-Speed 12-Bit ADCs (up to 2.4 - 5.0 MSPS)        |  |
|  |  * 12-Bit DACs (Dual Channel)                           |  |
|  |  * Advanced Timers (TIM1/TIM8 with Dead-Time Gen.)      |  |
|  |  * Comm: USART/UART, SPI/I2S, I2C, CAN 2.0B, USB, ENET  |  |
|  |  * GPIO Ports: GPIOA through GPIOH (16 pins per port)   |  |
|  +---------------------------------------------------------+  |
+---------------------------------------------------------------+

Key architectural advantages of the STM32 include:

  1. ARM Cortex-M 32-bit Pipeline: Instructions are executed using Thumb-2 instruction set technology, blending high code density with 32-bit mathematical throughput. A 3-stage (Fetch, Decode, Execute) or 5-stage pipeline ensures instruction execution on nearly every clock cycle.
  2. Nested Vectored Interrupt Controller (NVIC): Integrates directly with the CPU core to provide ultra-low interrupt latency (typically 12 clock cycles), automatic hardware state saving and restoring, and support for up to 240 external interrupt lines with 16 programmable priority levels.
  3. Multi-Channel DMA (Direct Memory Access): Enables peripheral-to-memory and memory-to-memory data transfers without CPU intervention. For example, high-speed ADC conversions stream directly into an SRAM array while the CPU core executes digital filtering in parallel.
  4. DSP & Hardware Floating-Point Unit (FPU): The Cortex-M4/M7 cores include a single-cycle Multiply-Accumulate (MAC) unit () and single-precision hardware floating-point instructions, enabling real-time Fast Fourier Transforms (FFT), matrix multiplication, and digital filtering (FIR/IIR) directly on sensor data.
  5. Phase-Locked Loop (PLL) Clock Multipliers: Internal clock circuits multiply low-frequency crystal inputs (e.g., 8 MHz) up to high internal system frequencies (72 MHz on STM32F103, 168 MHz on STM32F407, up to 480 MHz on STM32H7).

Pin configuration and power domains of STM32

STM32 devices are available in packages ranging from 48-pin LQFP (e.g., STM32F103C8T6 "Blue Pill") to 176-pin BGA arrays. Key functional pin groups include:


4.3.3 Comparative analysis: ATmega328P vs. STM32

AspectATmega328P (AVR)STM32 (ARM Cortex-M4)
CPU Architecture8-bit AVR RISC (Harvard)32-bit ARM Cortex-M4 with Thumb-2
Max Clock Speed16–20 MHz84–168 MHz
Instruction Pipeline2-stage (Single-cycle execution)3-stage with branch prediction
Hardware Math AccelerationHardware 8-bit integer multiplier onlyHardware single-cycle MAC and single-precision FPU
Flash Memory32 KB512 KB – 2 MB
SRAM2 KB96 KB – 512 KB
ADC Specifications10-bit resolution, 15 kSPS throughput12-bit resolution, 2.4 MSPS throughput (up to 7.2 MSPS interleaved)
Direct Memory Access (DMA)None (CPU must service every byte transfer)Multi-channel DMA controller
Operating Voltage (Nominally ) (Nominally )
Interrupt ControllerFlat vector table (no nested priority)NVIC with 16 programmable priority levels
Unit Cost & ToolchainUnder 2 USD; Arduino IDE, AVR-GCC2 to 6 USD; STM32CubeIDE, Keil, HAL/LL

4.3.4 Applications in modern instrumentation systems

ATmega328P Applications

  1. Educational & Prototyping Test Benches: Standard platform for rapid validation of transducer circuits (strain gauges, thermistors, photoresistors) via Arduino Uno.
  2. Low-Speed Data Loggers: Sampling environmental sensors (temperature, relative humidity, atmospheric pressure) at 1–10 Hz intervals and recording data onto an SPI SD card.
  3. Basic Actuator Controllers: On/off and PWM speed control for DC motors, peristaltic pumps, relay switching, and dual-axis solar trackers.
  4. Dedicated Handheld Instruments: Handheld digital thermometers, water turbidity meters, and battery impedance testers with 16x2 LCD readouts.

STM32 Applications

  1. Digital Storage Oscilloscopes (DSO): Dual-channel 12-bit ADCs running at 2 MSPS with DMA stream samples directly to memory for waveform capture and display.
  2. Real-Time Vibration & Spectral Analyzers: High-frequency accelerometers sampled at 50 kHz; on-chip 1024-point FFT executed in under 1 millisecond using hardware FPU and DSP instructions.
  3. Industrial Fieldbus Transmitters: Smart transmitters communicating via industrial CAN bus 2.0B, Modbus RTU, or Industrial Ethernet (EtherCAT).
  4. High-Precision Bio-Instrumentation: Multi-lead ECG monitors and ultrasound diagnostic transducers requiring concurrent digital filtering, high-resolution ADCs, and low-latency safety alarms.

Worked Examples

Example 1

1

An ATmega328P microcontroller utilizes its internal 10-bit Successive Approximation ADC with reference voltage pin connected to .

  1. Calculate the resolution (voltage step size, ) of the ADC.
  2. Determine the digital code generated when an analog sensor outputs a voltage of .
  3. Calculate the maximum theoretical quantization error inherent in this measurement.

Calculating the ADC resolution (step size): A 10-bit analog-to-digital converter divides the full-scale reference span into discrete quantization levels:

Evaluating the digital output code: The digital output code for input voltage is:

In hexadecimal notation:

Calculating the maximum quantization error:

Answer:
  1. Resolution (): 4.8828 mV.
  2. Digital Code: 666 (decimal) = 0x29A (hexadecimal).
  3. Maximum Quantization Error: mV.
Example 2

2

An ATmega328P running at is configured to toggle an alarm LED at a frequency of (period , corresponding to an interrupt event every or interrupt frequency ) using the 16-bit Timer1 in CTC (Clear Timer on Compare Match) mode.

  1. Determine the appropriate clock prescaler to keep the compare match count within the 16-bit limit ().
  2. Calculate the exact value to be loaded into the Output Compare Register OCR1A.
  3. Provide the C code fragment initializing Timer1.

Selecting the prescaler : The formula for the compare match frequency in CTC mode is:

Rearranging for :

Testing possible prescaler values for :

  • If : (exceeds 16-bit capacity).
  • If : (fits perfectly).

Thus, prescaler is selected.

Calculating OCR1A:

Providing the initialization code:

ATmega328P Timer1 CTC Mode InitializationC
#include <avr/io.h>
#include <avr/interrupt.h>

void timer1_init(void) {
    TCCR1B = 0;                     // Stop timer and clear control register
    TCNT1 = 0;                      // Reset counter value to 0
    OCR1A = 31249;                  // Set compare match value for 0.5s interval
    TCCR1B |= (1 << WGM12);         // Configure Timer1 for CTC mode (mode 4)
    TCCR1B |= (1 << CS12);          // Set prescaler to 256 and start timer
    TIMSK1 |= (1 << OCIE1A);        // Enable Timer1 Output Compare A match interrupt
    sei();                          // Enable global interrupts
}
Answer:
  1. Selected Prescaler: .
  2. Compare Register Value: OCR1A = 31249.
  3. Timer1 CTC mode generates an interrupt every 0.5 s, toggling the LED at 1.0 Hz.
Example 3

3

An STM32F4 microcontroller is equipped with a 12-bit Successive Approximation ADC operating from an analog clock frequency and reference voltage .

  1. If the sampling time is programmed to ADC clock cycles and the SAR conversion phase requires cycles, calculate the total conversion time and maximum sampling throughput in Mega Samples Per Second (MSPS).
  2. Calculate the voltage step size () of this 12-bit ADC.
  3. Compare this step size quantitatively with the 10-bit ATmega328P ADC operating at .

Calculating total conversion time and throughput: The total conversion time in clock cycles is:

The conversion duration in microseconds:

The maximum continuous throughput is:

Calculating voltage step size: For a 12-bit converter with :

Comparing with ATmega328P: For the ATmega328P (10-bit at ):

Ratio of precision:

The STM32 12-bit converter resolves voltage changes over six times finer than the 10-bit ATmega328P.

Answer:
  1. Conversion Time: 1.0 s; Maximum Throughput: 1.0 MSPS.
  2. 12-bit Step Size: 0.8057 mV ().
  3. The STM32 provides higher voltage measurement resolution than the 10-bit ATmega328P.

Exercises

Exercises

Question 1

Compare the architectural features of the ATmega328P and STM32 microcontrollers, specifically explaining why the STM32 is preferred for real-time digital signal processing in modern instrumentation.

Architectural comparison:

  • Bus Width and ALU: ATmega328P has an 8-bit data bus and ALU; STM32 has a full 32-bit internal architecture based on ARM Cortex-M.
  • Clock Speed: ATmega328P operates up to 16–20 MHz; STM32 achieves 72 to 480 MHz using internal PLL frequency multipliers.
  • Memory: ATmega328P provides 32 KB Flash and 2 KB SRAM; STM32 provides up to 2 MB Flash and 512 KB SRAM.
  • Data Conversion: ATmega328P contains a 10-bit ADC (15 kSPS); STM32 contains multiple 12-bit/16-bit ADCs (up to 2.4 MSPS) backed by DMA.

Why STM32 is preferred for DSP: Signal processing tasks such as FIR filtering, IIR filtering, and Fast Fourier Transforms (FFT) require intensive floating-point and multiply-accumulate operations:

  1. Hardware FPU: STM32 Cortex-M4/M7 cores include a single-precision hardware Floating-Point Unit executing IEEE 754 arithmetic in hardware. The 8-bit ATmega328P must emulate floating-point arithmetic through multi-instruction software routines, consuming hundreds of clock cycles per operation.
  2. Single-Cycle MAC: STM32 includes dedicated DSP instructions that multiply two numbers and accumulate the product in a single clock cycle ().
  3. DMA Support: The STM32 DMA controller automatically streams ADC samples into RAM buffers without CPU intervention, allowing the CPU core to focus entirely on numerical filtering algorithms.
Answer:

The STM32 is preferred for real-time DSP because of its 32-bit architecture, higher clock speed, hardware Floating-Point Unit (FPU), single-cycle Multiply-Accumulate (MAC) unit, and DMA-driven multi-channel data acquisition, whereas the 8-bit ATmega328P lacks hardware floating-point and DMA capabilities.

Question 2

Detail the functional roles of the following ATmega328P pins in an instrumentation system: PC6 (), AREF, AVCC, PD2 (INT0), and PB3–PB5 (SPI lines).

Identifying pin functions:

  • PC6 (): An active-low external hardware reset pin. Driving this pin low for longer than the minimum pulse width resets the CPU and all peripheral registers. It allows emergency system restarts and initiates in-system programming (ISP).
  • AREF (Analog Reference): Provides the positive voltage reference input for the internal 10-bit ADC converter, defining the full-scale analog measurement ceiling.
  • AVCC (Analog Power Supply): Dedicated power supply pin for the ADC converter and Port C analog multiplexers. Must be connected to via an external LC filter network to isolate sensitive analog measurements from digital switching transients.
  • PD2 (INT0): External hardware interrupt 0 pin. Configurable to trigger an immediate Interrupt Service Routine (ISR) on low level, falling edge, rising edge, or any logical change, enabling zero-latency responses to critical fault sensors.
  • PB3–PB5 (SPI Bus): PB3 is Master-Out-Slave-In (MOSI), PB4 is Master-In-Slave-Out (MISO), and PB5 is Serial Clock (SCK). These pins form a synchronous SPI bus for interfacing high-speed external instrumentation peripherals such as SD card data loggers, SPI DACs, and digital accelerometers.
Answer:

PC6 resets the processor; AREF sets the ADC conversion voltage scale; AVCC powers the internal ADC through noise-isolated analog power; PD2 (INT0) provides low-latency external interrupt handling; and PB3–PB5 form the SPI serial bus for high-speed peripheral expansion.

Question 3

An analog sensor connected to channel ADC2 (PC2) of an ATmega328P produces an output of . The microcontroller uses .

  1. Find the 10-bit digital value stored in registers ADCL and ADCH.
  2. Reconstruct the digitized voltage from this code and compute the absolute conversion error.

Calculating digital value:

Representing in 10-bit binary:

In the default right-adjusted ADC mode:

  • ADCL (lower 8 bits): .
  • ADCH (upper 2 bits): .

Reconstructing voltage and error:

This is well within the ideal quantization error bound ().

Answer:
  1. Digital Value: 563 (ADCL = 33H, ADCH = 02H).
  2. Reconstructed Voltage: 2.7490 V; Absolute Error: 0.98 mV.
Question 4

Design the configuration of Timer1 in the ATmega328P to trigger a periodic sensor sampling interrupt at an exact frequency of using a system clock and prescaler . Determine the value to be loaded into OCR1A.

Evaluating the CTC formula: In CTC mode, the interrupt period is given by:

Setting , , and :

Since , it comfortably fits within the 16-bit register.

Answer:

The value loaded into OCR1A is 15624 (with prescaler ) to generate an exact 1.0 Hz periodic sampling interrupt.

Question 5

Describe the operation of the Nested Vectored Interrupt Controller (NVIC) in STM32 microcontrollers, and explain how interrupt preemption and sub-priority levels ensure deterministic response in multi-sensor systems.

Operation of the NVIC: The NVIC is tightly coupled to the ARM Cortex-M processor core. It manages up to 240 external interrupt lines with hardware priority arbitration. When an interrupt is triggered, the NVIC automatically saves core registers (R0-R3, R12, LR, PC, xPSR) onto the stack in hardware within 12 clock cycles and loads the ISR address directly from the vector table, bypassing software dispatch overhead.

Preemption and sub-priority: NVIC interrupt priorities are split into two fields via software configuration:

  1. Preemption Priority: If an interrupt with higher preemption priority occurs while a lower-priority ISR is executing, the CPU immediately preempts (suspends) the current ISR and executes the new handler. This guarantees that critical safety events (such as over-pressure or motor stalls) are handled instantly.
  2. Sub-Priority: When two interrupts with identical preemption priority arrive simultaneously, the one with the higher sub-priority is serviced first. However, an active ISR cannot be preempted by another interrupt of the same preemption priority.
Answer:

The NVIC delivers deterministic low-latency interrupt dispatch through hardware register stacking and direct vector loading. Preemption priority allows higher-priority critical events to interrupt active handlers, while sub-priority resolves simultaneous pending requests without preemption.

Question 6

An STM32 12-bit ADC has . An industrial pressure transmitter supplies an analog signal of .

  1. Compute the 12-bit integer conversion result.
  2. Calculate the corresponding reconstructed voltage and the quantization step size.

Evaluating digital output code: For a 12-bit ADC ( states):

In hexadecimal notation:

Evaluating reconstructed voltage and step size:

Answer:
  1. 12-bit Digital Code: 2607 (decimal) = 0xA2F (hexadecimal).
  2. Reconstructed Voltage: 2.1004 V; Step Size: 0.8057 mV.
Question 7

Explain the power-saving sleep modes available in the ATmega328P, and discuss how entering Power-down mode during measurement idle periods extends battery lifetime in a remote wireless sensor node.

Power-saving sleep modes in ATmega328P: The ATmega328P provides six software-selectable sleep modes:

  1. Idle Mode: Stops the CPU clock while allowing the ADC, SPI, USART, Watchdog, and Timers to continue running. Current drops from to .
  2. ADC Noise Reduction Mode: Stops the CPU and all I/O clocks except the ADC clock, minimizing internal digital switching noise during analog conversion.
  3. Power-down Mode: Shuts down all internal oscillators, leaving only external interrupts, 2-wire serial address watch, and the Watchdog Timer active. At , supply current drops to (with WDT enabled) or (with WDT disabled).
  4. Power-save, Standby, and Extended Standby Modes: Intermediate modes retaining external timer oscillators or fast wake-up clocks.

Impact on battery life in remote sensor nodes: In remote instrumentation, a sensor node typically spends of its time actively sampling and transmitting data ( for ) and of its time idling between samples (). Without sleep modes, continuous consumption at depletes a standard battery in (about 8 days). By entering Power-down mode during idle periods ():

Battery operational life increases from 8 days to over:

Answer:

The ATmega328P provides Idle, ADC Noise Reduction, and Power-down modes. Entering Power-down mode () during 95% of the operating cycle reduces average current consumption from 10 mA to ~0.5 mA, extending battery life from 8 days to over 5 months.

Past exam questions for Instrumentation

← Microprocessor and microcontroller and their selection criteria, and…Sensor/Actuator interfacing with Atmega328P (Arduino): Analog and… →