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.
- 6peripheral areas modeled
- 2projects ready to run
- Real timeon your own machine
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.
Open one and press Run
Each of these opens in the editor exactly as it is drawn here.
Every built-in project on the ATmega328P
Each has its own page with the circuit running, the code and a parts list.
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.
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.
Tutorials that use this board
Each one ends in a running circuit, on this same board.
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.
The other boards
Every one of these runs today, and every one is free.
A RISC-V chip at 160 MHz, on the real memory map.
The classic Arduino, with an ATmega328P running at 16 MHz.
The Uno’s chip on a small board that fits a breadboard.
The big Arduino, with 54 digital pins and four serial ports.
An Uno-shaped board whose chip does its own USB serial.
A second RISC-V board, with 31 pins and simulated WiFi.
The classic ESP32 at 240 MHz, with simulated WiFi.
The ESP32-S3 at 240 MHz, with USB serial and an RGB LED.
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.