PadhaikoAll subjects

Past exam question: Assignment 3, Q9

Instrumentation · 6 marks

Open in the Padhaiko app

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

Question

Briefly explain Atmega328 Architecture in detail.

Solution

Overview & Core Harvard Architecture: The ATmega328 / ATmega328P is an 8-bit AVR RISC microcontroller by Microchip (Atmel), operating at with up to clock ( on Arduino Uno, delivering up to ).

ATmega328 Architecture Block Diagram:

ATmega328 Internal Architecture Block DiagramText
                   +---------------------------+
                   | 32 KB Flash Program Mem   |
                   | & Instruction Decoder     |
                   +-------------+-------------+
                                 | Program Bus (16-bit)
+------------------+    +--------v--------+    +--------------------+
| 2 KB SRAM        |<-->|   AVR CPU Core  |<-->|  1 KB EEPROM       |
| 32x8 GP Regs     |    | ALU + SREG + PC |    +--------------------+
+------------------+    +--------+--------+
                                 | 8-bit Data Bus
   +-------------+---------------+---------------+-------------+
   |             |               |               |             |
+--v---+   +-----v-----+   +-----v-----+   +-----v-----+   +---v----+
|Timers|   | 10-bit    |   | USART /   |   | Watchdog  |   | 23 I/O |
|0,1,2 |   | 6-ch ADC  |   | SPI / I2C |   | & Sleep   |   | Ports  |
|(PWM) |   | & Analog  |   |           |   | Control   |   | B,C,D  |
+------+   | Comp.     |   +-----------+   +-----------+   +--------+
           +-----------+

Memory Organization and Integrated Peripherals:

Answer:

The ATmega328 uses an 8-bit AVR RISC Harvard architecture with a single-cycle ALU, 32 general-purpose registers, 32 KB Flash, 2 KB SRAM, 1 KB EEPROM, 23 I/O lines (Ports B, C, D), three timers (two 8-bit, one 16-bit) with 6 PWM channels, a 10-bit 6-channel ADC, hardware USART/SPI/I²C, and 6 low-power sleep modes.

All past exam questions for Instrumentation