Built-in project · ATmega328P, 16 MHz crystal

ATmega328P on a breadboard

The Uno’s chip on its own in a breadboard, wired as the tutorial wires it: 5 V on VCC and AVCC, both grounds, RESET held high, and an LED on PB5, which is pin 13 in code. The whole build, an ATmega328P on a breadboard and 3 more parts, runs here in your browser on the firmware below; open it in the editor to change the wiring or the code and run it again.

Teaching? Assign it to your class in one click.

Beginner Runs in your browser. Free, and no account needed.

The parts retail for about $8.20. On Mokxi they're free.

ATmega328P on a breadboard · ATmega328P, 16 MHz crystallive0.000 s 0.00x
Click to open it in the editor
The circuit itself, running here on the simulator. Press what can be pressed; click anything else to open it in the editor.

The code

The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.

sketch.ino · ATmega328P, 16 MHz crystal
// Blink: the smallest thing a board can do.
//
// Pin 13 has the LED soldered next to the USB socket, so LED_BUILTIN is 13.
// Wire an LED and a 220 ohm resistor from pin 13 to GND to see it on the
// breadboard too.
//
// delay() puts the chip to sleep between timer ticks rather than spinning, so
// this sketch costs the simulator almost nothing while it waits.

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}

Parts list

6 parts, plus the jumper wires. They retail for about $8.20; on Mokxi they're free.

How it is wired

5 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.

  • 5 V: ATmega328P, 16 MHz crystal pin VCC; ATmega328P, 16 MHz crystal pin AVCC; Resistor, 10k Ω pin 1
  • Ground: ATmega328P, 16 MHz crystal pin GND; ATmega328P, 16 MHz crystal pin GND; LED, red pin C
  • ATmega328P, 16 MHz crystal pin RESET; Resistor, 10k Ω pin 2
  • ATmega328P, 16 MHz crystal pin PB5; Resistor, 220 Ω pin 1
  • Resistor, 220 Ω pin 2; LED, red pin A

Change it and keep it

Open it in the editor, change the circuit or the code, and keep your version in a free account.