Source: https://mokxi.com/boards/atmega328p
Updated: 2026-10-26

Board

# ATmega328P simulator, an Arduino on a breadboard

The ATmega328P is the Uno’s chip on its own, in a 28-pin DIP that pushes into a breadboard. Mokxi has both builds the tutorials wire: 16 MHz from a crystal, which runs the Uno’s programs, and 8 MHz from the internal clock, which frees pins 9 and 10. Wire VCC to a supply, or nothing runs, as on the bench.

Start building free

- 6 peripheral areas modeled
- 2 projects ready to run
- Real time on your own machine

Click to open it in the editor

The board is running real firmware right now. Click it to open the circuit in the editor.

The model

## What is modeled

Taken from the board's own contract document and put in plain words, with what is missing beside it.

### Modeled

Core

Every ATmega328P mnemonic with datasheet cycle counts, at exactly 16 MHz or exactly 8 MHz

Timers

Three, in every waveform mode, with hardware PWM on pins 3, 5, 6, 9, 10 and 11

USART0

Wired to the serial monitor, paced at the baud rate you set

ADC

A0 to A5 on PC0 to PC5, ten bits

Supply

The chip runs only while VCC is on a supply of 1.8 V or more; without one every pin lets go

The package

All 28 pins in package order; pins 9 and 10 are the crystal’s on one build and PB6 and PB7 on the other

### Not modeled

- The crystal and its two capacitors. They are not parts, and the clock is the build’s whether or not a crystal is wired.
- The internal oscillator’s error: the 8 MHz here is exact. And the pins swing to 5 V whatever VCC is, so a chip on 3.3 V is not modeled as one.
- AVCC and AREF are not checked, and there is no on-board LED, because there is no board.
- Fuses and burning a bootloader. Each build starts with its clock set.

Start here

## Open one and press Run

Each of these opens in the editor exactly as it is drawn here.

Projects

## Every built-in project on the ATmega328P

Each has its own page with the circuit running, the code and a parts list.

- ATmega328P on a breadboard Beginner

Libraries

## Arduino libraries that compile as they are

Paste a tutorial that includes one of these and it builds. For any other library, the build names the Mokxi header that does the same job.

Servo.h

attach, write, writeMicroseconds, read, detach, on any pin

Wire.h

I2C as a master; Wire.begin() puts it on PC4 (SDA, A4) and PC5 (SCL, A5)

SPI.h

transfer and transactions, on the board’s usual SPI pins

EEPROM.h

read, write, update, get, put and EEPROM[i], kept in the chip’s own 1 KB EEPROM

LiquidCrystal_I2C.h

the 16x2 LCD behind its I2C backpack

Adafruit_GFX.h and Adafruit_SSD1306.h

the 128x64 I2C OLED: text, pixels, lines, rectangles, circles, triangles and bitmaps

Adafruit_NeoPixel.h

WS2812 strips and panels

DHT.h

the DHT11 and DHT22: temperature, humidity and the heat index, as floats you can print

And 15 more, 23 in all: OneWire.h and DallasTemperature.h ; Adafruit_BME280.h, Adafruit_BMP280.h and SparkFunBME280.h ; RTClib.h ; Adafruit_SHT31.h ; Adafruit_PCF8591.h ; Adafruit_ADXL345_U.h ; LedControl.h ; Adafruit_LEDBackpack.h ; Adafruit_TCS34725.h ; Adafruit_SGP30.h ; Adafruit_INA219.h ; Adafruit_ADS1X15.h ; Adafruit_MCP23X17.h ; Bounce2.h ; HX711.h .

Learn

## Tutorials that use this board

Each one ends in a running circuit, on this same board.

- The ATmega328P pinout: package pins, port names and Uno numbers

## Questions

Is it free?

Yes. Every board and every part is on the free plan, with no account needed.

Why does nothing happen?

Check the supply first. The chip is not a board, so it has no supply of its own: wire VCC and AVCC to 5 V and both GND pins to ground. Without a supply on VCC every pin lets go, here as on the bench.

Do I need the crystal?

On a real 16 MHz chip, yes: a crystal between pins 9 and 10, with a 22 pF capacitor from each to ground. In Mokxi the crystal is not a part, and the chip runs at 16 MHz without one. The 8 MHz build needs none anywhere.

How do I program a real one?

With a programmer, such as a USBasp or an Uno running Arduino as ISP, or through a USB serial adapter if the chip has the Uno’s bootloader. The 8 MHz chip needs its fuses set once first: pick MiniCore’s ATmega328 with the internal 8 MHz clock and burn the bootloader.

Also here

## The other boards

Every one of these runs today, and every one is free.

ESP32-C3-DevKitM-1

A RISC-V chip at 160 MHz, on the real memory map.

Open the board page

Arduino Uno R3

The classic Arduino, with an ATmega328P running at 16 MHz.

Open the board page

Arduino Nano

The Uno’s chip on a small board that fits a breadboard.

Open the board page

Arduino Mega 2560

The big Arduino, with 54 digital pins and four serial ports.

Open the board page

Arduino Leonardo

An Uno-shaped board whose chip does its own USB serial.

Open the board page

ESP32-C6-DevKitC-1

A second RISC-V board, with 31 pins and simulated WiFi.

Open the board page

ESP32 DevKit V1

The classic ESP32 at 240 MHz, with simulated WiFi.

Open the board page

ESP32-S3-DevKitC-1

The ESP32-S3 at 240 MHz, with USB serial and an RGB LED.

Open the board page

All 39 boards

## Try it on your own firmware

What you build here runs on the board on your desk, unchanged. Nothing to install and no account needed.

Start building free Open the editor
