ATmega328P, the one microcontroller you should start with

Nowadays, with Microcontrollers being relatively cheap and readily available in the market, making a purchase decision on a suitable one to pick might a hard task to handle. However, there’s one particular model that’s good to start with for users. That model is the ATmega328p, an 8-bit AVR microcontroller.

This article will provide insights as to why the ATmega328p is the one for you.

It’ll cover the following components:

  • What is ATmega328P?
  • Product Features and Parametrics
  • Comparisons between fellow competitors: STM32 and MSP430
  • Product Recommendations
  • Summary

What is ATmega328P?

ATmega328P is a high performance yet low power consumption 8-bit AVR microcontroller that’s able to achieve the most single clock cycle execution of 131 powerful instructions thanks to its advanced RISC architecture. It can commonly be found as a processor in Arduino boards such as Arduino Fio and Arduino Uno.

Features and Parametrics

Features:

High endurance non-volatile memory segments

  • In system self-programmable flash program memory
  • Programming Lock for software security

Peripheral features

  • Two 8-bit Timer/Counter with separate prescaler, compare mode.
  • One 16-bit Timer/Counter with separate prescaler, compare mode, and capture mode
  • Temperature measurement
  • Programmable serial USART and watchdog timer with separate on-chip oscillator

Unique features compared to other microcontrollers (ARM, 8051, PIC):

  • Power-on reset and programmable brown-out detection
  • Internal calibrated oscillator
  • External and Internal interrupt sources
  • Six sleep modes: Idle, ADC noise reduction, power-save, power-down, standby, and extended standby

Parametrics

Program Memory TypeFlash
Program Memory Size32
CPU Speed (MIPS/DMIPS)20
SRAM (KB)2,048
Data EEPROM/HEF (bytes)1,024
Digital Communication Peripheral 1-UART, 2-SPI, 1-I2C
Capture/Compare/PWM Peripheral 1 Input Capture, 1 CCP, 6PWM
Timers/Counters2 x 8-bit, 1x 16 bit
Number of Comparators1
Temperature Range -40 to 85deg
Operating Voltage Range (V)1.8 to 5.5V
Pin Count32
Low PowerYes

Advantages and Disadvantages:

Advantages:

  • Processors are simpler to use, with the usage of 8bit and 16bit instead of 32/64bit which are more complex
  • Readily usable without additional computing components with 32k bytes of onboard self-programmable flash program memory as well as 23 programmable I/O lines
  • Code Efficient, all 31 registers are directly connected to the arithmetic logic unit (ALU), making it 10 times faster than conventional CISC microcontrollers
  • Optimized for AVR enhanced RISC instruction set

Disadvantages:

  • Lacks performance compared to higher bit microcontrollers

Product Applications

The ATmega328P is supported with a full suite of program and system development tools which includes: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits.

The fast PWM mode that provides a high-frequency PWM waveform generation allows for it to be suited for power regulation, rectification, and DAC applications.

Product Comparisons

Which is better? Atmega368P vs STM32 vs MSP430

ATmega328P STM32 MSP430
Brand MicroChip Cortex Texas Instruments
Cost Low High Low
Architecture Advanced RISC architecture Power Architecture technology designed for embedded applciations Older, von-Neumann architecture
Power Consumption Low, more efficient power consumption Medium, higher clock speed may result in higher consumption power Low
Performance Medium, lower bit but suitable for complex projects High, fast processing speed, packs more power.
Running 32 bit ARM processor core with sufficient RAM
Low, more suitable for only simple projects
Ease of Usage Easy to use, 8 bit and high compatibility with Arduino boards Complicated due to its nature of being a 32 bit microcontroller Complex relative to Arduino boards

Verdict: Atmega368P. Though it lacks performance as compared to the STM32, its lower relative low cost and features packed makes it a value for money option that one should consider.

AtMega328P vs AtMega328

  • Both share similar architectural design
  • ATmega328P consumes lesser power
  • ATmega328P slightly pricier
  • TQFP package is only available in the 328P version

Verdict: Though 328P is slightly pricier than its previous successor, it’s able to save you couple microamps of power. In addition, the TQFP package variant of the chip is only available in the 328P.

Product Recommendations

Seeeduino V4.2: Value for Money Option


For only the price of $6.90, you’ll be able to get an Arduino UNO-R3 shield fully compatible board that uses ATmega328P microcontroller.

Product Features include:

  • 14 Digital I/O Pins (6 PWM outputs)
  • 6 Analog Inputs
  • Micro USB programming and power supply
  • ISP Header
  • 3 on-board Grove connectors for better prototyping
  • 3.3/5V system operation power switch

Pros:

  • Relatively cheap and suitable for beginners
  • Usage of micro USB to power and program the board for ease of usage

Seeeduino Lotus V1.1: Cost-effective board that’s compatible with your Mac Os

Features

  • Combination of Seeeduino and base shield.
  • Arduino UNO Compatible, uses the same chip (ATmega328P)
  • On-board Grove connector
  • Mac OS compatible.
  • Cost-effective

Seeeduino Nano: The cheaper and better alternative of the Adruino Nano

The Seeeduino Nano packs USB Type-C instead of the typical mini USB that Adruino Nano uses. Furthermore, the added grove connectors allow for hundreds of sensors and actuators being played through simply plugging.

Features 

  • 43mm*18mm Tiny board
  • 16M ATmega328P
  • Fully compatible with Arduino Nano
  • USB Type C for Programming and power
  • On-board Grove I2C connector
  • Breadboard-friendly

Main differences between Seeeduino Nano and Arduino Nano:

Seeeduino Nano Arduino Nano
Processor ATmega328P ATmega328P
Input Voltage 5V / 7-12V 5V / 7-12V
IO Voltage 5V 5V
Analog In/Out 8/0 8/0
Digital IO/PWM 14/6 14/6
USB Type-C Mini-USB
Grove Connectors 1xI2C No Grove Connectors

Summary

With the seemingly popularity of Arduino boards and its compatibility with ATmega368p, it stands out among the pack as the one to start with for your project. The relative features and low cost makes the ATmega368P a value for money option. However, if performance is placed high among your list, the STM32 model would be the one for you.

About Author

Calendar

October 2019
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031