STM8S103F3 VS ATmega328p: Which microcontroller is better ?

UTMEL

Published: 01 March 2022 | Last Updated: 01 March 2022

5229

ATMEGA328-PU

ATMEGA328-PU

Microchip Technology

32KB 16K x 16 FLASH AVR 8-Bit Microcontroller AVR® ATmega Series ATMEGA328 28 Pin 20MHz 5V 28-DIP (0.300, 7.62mm)

Purchase Guide

32KB 16K x 16 FLASH AVR 8-Bit Microcontroller AVR® ATmega Series ATMEGA328 28 Pin 20MHz 5V 28-DIP (0.300, 7.62mm)

This article compares the ATmega and STM32 microcontrollers so you can pick the ideal one for your own tech project, taking into account total cost, system cost, and upward migration path.

This video demonstrates detailed information about STM8S103F3 and ATmega328p, and interpret the differences between them.

STM8S103F3 vs ATmega328p

Overview of STM8S103F3

The 8-bit microcontrollers on the STM8S103F3   access line have an 8-Kbyte Flash program memory and an inbuilt true data EEPROM. Devices in this family are referred to as low-density in the STM8S microcontroller family reference manual (RM0016). Performance, robustness, and lower system costs are among the advantages they give. Advanced core and peripherals created with cutting-edge technology, a 16 MHz clock frequency, strong I/Os, independent watchdogs with distinct clock sources, and a clock security system ensure device performance and reliability.

Due to an integrated real data EEPROM    with up to 300 k  write/erase cycles and a high system integration level with internal clock oscillators, watchdog, and brown-out reset, the system cost is lowered. A comprehensive set of documentation is available, as well as a diverse set of development tools.


Overview of ATmega328p

The ATmega328p is a CMOS  8-bit microcontroller based on the AVR  ® improved RISC  architecture with low power consumption. The devices achieve CPU throughput approaching one million instructions per second (MIPS) per megahertz by executing instructions in a single clock cycle, allowing the system designer to optimize power consumption versus processing performance.

STM8S103F3 VS ATmega328p Features

STM8S103F3 Features

Core:

  • Advanced STM8 core with Harvard architecture and 3-stage pipeline running at 16 MHz

  • Extensive collection of instructions

Memories:

  • Data retention 20 years at 55 °C after 10 cycles; program memory: 8 Kbyte Flash

  • Data memory is a 640-byte true data EEPROM with 300-cycle durability.

  • 1 KByte of RAM

Management of the clock, the reset, and the supply chain:

  • Operating voltage: 2.95 to 5.5 V

  • 4 master clock sources, flexible clock control

  • Oscillator with a low-power crystal resonator

  • The input of an external clock

  • Internal 16 MHz RC with user-trimmable frequency

  • Internal 128 kHz low-power RC

  • A clock security system with a clock monitor is available.

  • Managing energy

  • Modes with low power consumption (wait, active-halt, halt)

  • Individually turn off peripheral clocks.

  • Power-on and power-down resets that are permanently active and low-consumption

 Interrupt management:

  • 32 interrupts nested interrupt controller

  • up to 27 external interrupts on 6 vectors

  • timers

  • advanced control timer: 16-bit, 4 CAPCOM channels, 3 complementary outputs, dead-time insertion, and flexible synchronization

  • 16-bit general-purpose timer, with 3 CAPCOM channels (IC, OC, or PWM)

  • 8-bit basic timer with 8-bit Prescaler

  • Auto wake-up timer

  • window watchdog and independent watchdog timers

Communication interfaces:

  • UART with clock output for synchronous operation, SmartCard, IrDA, LIN master mode

  • SPI interface up to 8 Mbit/s

  • I2C interface up to 400 kbit/s

Analog to digital converter (ADC):

  • 10-bit, ±1 LSB ADC with up to 5 multiplexed channels, scan mode, and analog watchdog

I/Os:

up to 28 I/Os on a 32-pin package including 21 high sink outputs

  • highly robust I/O design, immune against current injection

Unique ID:

  • 96-bit unique key for each device



ATmega328p Features

High Performance, Low Power AVR® 8-Bit Microcontroller Family

  • Advanced RISC Architecture

  • 131 Powerful Instructions – Most Single Clock Cycle Execution

  • 32 x 8 General Purpose Working Registers

  • Fully Static Operation

  • Up to 20 MIPS Throughput at 20MHz

  • On-chip 2-cycle Multiplier

High Endurance Non-volatile Memory Segments

  • 4/8/16/32KBytes of In-System Self-Programmable Flash program memory

  • 256/512/512/1KBytes EEPROM

  • 512/1K/1K/2KBytes Internal SRAM

  • Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

  • Data retention: 20 years at 85°C/100 years at 25°C(1)

  • Optional Boot Code Section with Independent Lock Bits

In-System Programming by On-chip Boot Program

True Read-While-Write Operation

  • Programming Lock for Software Security

 QTouch® library support

  • Capacitive touch buttons, sliders, and wheels

  • QTouch and QMatrix™ acquisition

  • Up to 64 sense channels

Peripheral Features

  • Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode

  • One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode

  • Real-Time Counter with Separate Oscillator

  • Six PWM Channels

  • 8-channel 10-bit ADC in TQFP and VQFN package

Temperature Measurement

  • 6-channel 10-bit ADC in SPDIP Package

Temperature Measurement

  • Programmable Serial USART

  • Master/Slave SPI Serial Interface

  • Byte-oriented 2-wire Serial Interface (Philips I2C compatible)

  • Programmable Watchdog Timer with Separate On-chip Oscillator

  • On-chip Analog Comparator

  • Interrupt and Wake-up on Pin Change

Special Microcontroller Features

  • 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

I/O and Packages

  • 23 Programmable I/O Lines

  • 28-pin SPDIP, 32-lead TQFP, 28-pad VQFN, and 32-pad VQFN

Operating Voltage:

  • 1.8 - 5.5V

Temperature Range:

  • -40°C to 85°C

Speed Grade:

  • 0 - 4MHz@1.8 - 5.5V, 0 - 10MHz@2.7 - 5.5.V, 0 - 20MHz @ 4.5 - 5.5V

Power Consumption at 1MHz, 1.8V, 25°C

  • Active Mode: 0.2mA

  • Power-down Mode: 0.1µA

Power-save Mode: 0.75µA (Including 32kHz RTC)


STM8S103F3 VS ATmega328p Block Diagram

STM8S103F3 Block Diagram.jpg

STM8S103F3 Block Diagram

ATmega328p Block Diagram.jpg

ATmega328p Block Diagram

STM8S103F3 VS ATmega328p CAD Model

STM8S103F3 CAD Model

STM8S103F3 Symbol.jpg

STM8S103F3 Symbol

STM8S103F3 Footprint.jpg

STM8S103F3 Footprint



ATmega328p CAD Model

ATmega328p Symbol.jpg

ATmega328p Symbol

ATmega328p Footprint.jpg

ATmega328p Footprint

STM8S103F3 VS ATmega328p Specifications


ATmega328pSTM8S103F3
Clock Frequency (MHz)20 max.48 max.
Flash size (KB)3232
SRAM size (Bytes)20484096
EEPROM SIZE (Bytes)1024None.
CART11
SPI21
I 2 C11
Timers1 x 16-bit, 2 x 8-bit4 x 16-bit
ADC8 x 10bit (TQFP Package)10 x 12-bit
GPIO23 (shared with other peripherals)26 (shared with other peripherals)
Internal ADC referenceYesYes


Comparison between the STM8S103F3 and ATmega328p

While most of this section is about deciding between ATmega and STM32 microcontrollers from a hardware standpoint, it also pertains to 8-bit vs. 32-bit microcontrollers. Here are some points to consider:

  1. In general, the ATmega microcontroller has a lower quiescent current than the STM  microcontroller. This is especially true if the STM32  has a large number of unused peripherals that the firmware cannot disable. They simply consume power without providing any value to the user application. Of course, this is a very essential, if not the most important, aspect.

  2. The majority of ATmega microcontroller s can operate at 5V, however, STM32  microcontroller s only have 5V  tolerant inputs. Without any regulators, the ATmega can happily run off three 1.5V series-connected batteries and continue to run until the batteries are completely spent. 3.3V LDO  s are required for STM32  s, and they will go out of regulation if the battery voltage falls below the LDO's dropout limit.

  3. ATmegas resist electrostatic discharge (ESD) better than STM32  s due to the bigger feature size of their internal transistors. In other words, they have a far higher chance of surviving ESD.

  4. In some situations, the 5V  logic provides a significant benefit in terms of electrical noise immunity.

  5. When compared to STM32  s, ATmega s have better drive capability, reducing the need for external hardware drivers.

  6. Some of the peripherals on ATmega microcontroller s, such as the ADCs, are actually superior to those on STM32  microcontrollers.

  7. True EEPROM  is available on ATmega s. Bytes can be written or erased individually. In its Flash, STM  32s can imitate EEPROM  capabilities. While it is possible to make it transparent to the user, it does require an additional layer of firmware, and the number of erase cycles is reduced.

  8. All that is required in simple applications is the ATmega microcontroller alone.


Conclusion:

The STM32 can accomplish everything an ATmega does, plus a lot more. In some cases, however, it makes more sense to utilize an ATmega instead of an STM32, just as it makes more sense to drive to fetch groceries rather than take a helicopter. It's easier to create apps for, and it's also easier to use. That is all that matters in some cases.


STM8S103F3 VS ATmega328p Package information

STM8S103F3 Package information.jpg

STM8S103F3 Package information

ATmega328p Package information.jpg

ATmega328p Package information

ATMEGA328P-AU Manufacturer

Microchip Technology Inc. is a leading provider of microcontroller and analog semiconductors, delivering low-risk product development, reduced overall system cost, and faster time to market to thousands of customers across the world. Microchip, based in Chandler, Arizona, provides excellent technical support as well as consistent delivery and quality.

Datasheet PDF

Download datasheets and manufacturer documentation for Microchip Technology ATMEGA328-PU.

Popularity by Region

Parts with Similar Specs

The three parts on the right have similar specifications to Microchip Technology & ATMEGA328-PU.
Frequently Asked Questions

What is the difference between ATMEGA328 and ATmega328P?

Except for power, there are no significant functional differences between them. This type of microcontroller is commonly seen in Arduino boards. The Atmega 328 performs the same functions as the Atmega 328p, however, the 328p consumes much fewer power thanks to ATMEL's PicoPower features. As a result, P stands for PicoPower.

What is ATMEGA328P?

The Atmega328P is at the center of every Arduino Uno board and acts as the 8-bit microcontroller that controls and interacts with sensors, motors, relays, and other electronic devices.

Why is STM32 so popular?

Furthermore, they are well suited to low-power applications, with STM having a low-power series that uses current as low as nanoamps in deep sleep mode. There are numerous reasons why the STM32 is superior. Because of Arduino boards, the ATMEGA series controllers are now commonly utilized among hobbyists.

What is stm8s103f3?

The STM8S103F2/x3 access line 8-bit microcontrollers offer 8 Kbyte Flash program memory, plus integrated true data EEPROM.
ATMEGA328-PU

Microchip Technology

In Stock

United States

China

Canada

Japan

Russia

Germany

United Kingdom

Singapore

Italy

Hong Kong(China)

Taiwan(China)

France

Korea

Mexico

Netherlands

Malaysia

Austria

Spain

Switzerland

Poland

Thailand

Vietnam

India

United Arab Emirates

Afghanistan

Åland Islands

Albania

Algeria

American Samoa

Andorra

Angola

Anguilla

Antigua & Barbuda

Argentina

Armenia

Aruba

Australia

Azerbaijan

Bahamas

Bahrain

Bangladesh

Barbados

Belarus

Belgium

Belize

Benin

Bermuda

Bhutan

Bolivia

Bonaire, Sint Eustatius and Saba

Bosnia & Herzegovina

Botswana

Brazil

British Indian Ocean Territory

British Virgin Islands

Brunei

Bulgaria

Burkina Faso

Burundi

Cabo Verde

Cambodia

Cameroon

Cayman Islands

Central African Republic

Chad

Chile

Christmas Island

Cocos (Keeling) Islands

Colombia

Comoros

Congo

Congo (DRC)

Cook Islands

Costa Rica

Côte d’Ivoire

Croatia

Cuba

Curaçao

Cyprus

Czechia

Denmark

Djibouti

Dominica

Dominican Republic

Ecuador

Egypt

El Salvador

Equatorial Guinea

Eritrea

Estonia

Eswatini

Ethiopia

Falkland Islands

Faroe Islands

Fiji

Finland

French Guiana

French Polynesia

Gabon

Gambia

Georgia

Ghana

Gibraltar

Greece

Greenland

Grenada

Guadeloupe

Guam

Guatemala

Guernsey

Guinea

Guinea-Bissau

Guyana

Haiti

Honduras

Hungary

Iceland

Indonesia

Iran

Iraq

Ireland

Isle of Man

Israel

Jamaica

Jersey

Jordan

Kazakhstan

Kenya

Kiribati

Kosovo

Kuwait

Kyrgyzstan

Laos

Latvia

Lebanon

Lesotho

Liberia

Libya

Liechtenstein

Lithuania

Luxembourg

Macao(China)

Madagascar

Malawi

Maldives

Mali

Malta

Marshall Islands

Martinique

Mauritania

Mauritius

Mayotte

Micronesia

Moldova

Monaco

Mongolia

Montenegro

Montserrat

Morocco

Mozambique

Myanmar

Namibia

Nauru

Nepal

New Caledonia

New Zealand

Nicaragua

Niger

Nigeria

Niue

Norfolk Island

North Korea

North Macedonia

Northern Mariana Islands

Norway

Oman

Pakistan

Palau

Palestinian Authority

Panama

Papua New Guinea

Paraguay

Peru

Philippines

Pitcairn Islands

Portugal

Puerto Rico

Qatar

Réunion

Romania

Rwanda

Samoa

San Marino

São Tomé & Príncipe

Saudi Arabia

Senegal

Serbia

Seychelles

Sierra Leone

Sint Maarten

Slovakia

Slovenia

Solomon Islands

Somalia

South Africa

South Sudan

Sri Lanka

St Helena, Ascension, Tristan da Cunha

St. Barthélemy

St. Kitts & Nevis

St. Lucia

St. Martin

St. Pierre & Miquelon

St. Vincent & Grenadines

Sudan

Suriname

Svalbard & Jan Mayen

Sweden

Syria

Tajikistan

Tanzania

Timor-Leste

Togo

Tokelau

Tonga

Trinidad & Tobago

Tunisia

Turkey

Turkmenistan

Turks & Caicos Islands

Tuvalu

U.S. Outlying Islands

U.S. Virgin Islands

Uganda

Ukraine

Uruguay

Uzbekistan

Vanuatu

Vatican City

Venezuela

Wallis & Futuna

Yemen

Zambia

Zimbabwe

Related Parts More