ATmega328P Simulator
Free AVR8 Emulation in Your Browser
Simulate ATmega328P firmware exactly as it runs on Arduino Uno and Nano — real AVR8 instruction execution at 16 MHz with full GPIO, timer, ADC, and USART emulation. No hardware, no install.
Free & open-source · Genuine AVR8 emulation · Runs 100% in your browser
ATmega328P specification — fully emulated
Everything about the ATmega328P is emulated: registers, peripherals, interrupts, and timing. Write bare-metal firmware or use the Arduino core library — both work identically in the simulator.
CPU Core
AVR8 (8-bit RISC), 16 MHz, 135 instructions, 32 general-purpose registers, 2-stage pipeline.
Flash Memory
32 KB program flash. Upload any sketch compiled by arduino-cli. Supports self-programming via SPM instruction.
GPIO Ports
PORTB (pins 8–13), PORTC (A0–A5), PORTD (0–7). DDR, PORT, PIN registers all emulated. Interrupt-on-change via PCINT.
Timers 0 / 1 / 2
8-bit Timer0 & Timer2, 16-bit Timer1. All PWM modes. Prescaler 1–1024. CTC, Fast PWM, Phase-correct PWM.
10-bit ADC
6 analog input channels (A0–A5). Single conversion and free-running modes. Analog voltage from simulated components.
USART0
Full duplex serial with configurable baud rate. TX, RX, and UDRE interrupts. Works with the built-in Serial Monitor.
ATmega328P boards in Velxio
The ATmega328P powers several popular Arduino boards — all selectable in Velxio. The broader AVR8 family also includes ATmega2560 (Mega) and ATtiny85.
Arduino Uno R3
The classic board. 14 digital I/O pins (6 PWM), 6 analog inputs, 32 KB flash. The most widely used ATmega328P board.
Arduino Nano
Same ATmega328P in a compact 45×18mm form factor with mini-USB. Same pin count as Uno.
Arduino Pro Mini
Bare-bones ATmega328P without USB chip. Available at 3.3 V/8 MHz and 5 V/16 MHz variants.
ATtiny85
Ultra-compact 8-pin AVR. 8 KB flash, 6 I/O pins (PB0–PB5), USI (Wire), Timer0/1, 10-bit ADC. Ideal for embedded minimal projects.
Arduino Mega 2560
ATmega2560 with 256 KB flash, 54 digital pins, 16 analog inputs, and 4 hardware USART channels.
Frequently Asked Questions
- What is the ATmega328P?
- The ATmega328P is an 8-bit AVR microcontroller by Microchip (formerly Atmel). It is the heart of the Arduino Uno and Arduino Nano, running at 16 MHz with 32 KB flash, 2 KB SRAM, and 1 KB EEPROM.
- Can I simulate ATmega328P register-level code?
- Yes. Velxio's AVR8 emulation faithfully executes all ATmega328P registers: DDRB/C/D, PORTB/C/D, PINB/C/D, TCCR0/1/2, OCR0/1/2, UBRR, UDR, ADCL/ADCH, and all interrupt vectors — including direct register manipulation without the Arduino abstraction layer.
- Does it emulate ATmega328P timers correctly?
- Timer0 (8-bit), Timer1 (16-bit), and Timer2 (8-bit) are all emulated with full prescaler support, PWM modes, overflow interrupts, and Output Compare Match interrupts. millis(), delay(), analogWrite(), and tone() all work correctly.
- Can I use analogRead() and analogWrite() in the simulator?
- Yes. The 10-bit ADC (analogRead) and PWM output (analogWrite on pins 3, 5, 6, 9, 10, 11) are fully emulated. You can connect simulated sensors, potentiometers, and any wokwi-elements analog component.
- Can I simulate USART / Serial on ATmega328P?
- Yes. USART0 is fully emulated. Serial.begin(), Serial.print(), Serial.println(), and Serial.read() all work. The built-in Serial Monitor shows TX output and lets you send RX data to the running program.
Simulate your ATmega328P code now
Open the editor, paste your sketch, and click Simulate — no setup, no hardware purchase required.
Launch ATmega328P Simulator →