ATmega328P at 8 MHz
An ATmega328P in a breadboard on its internal 8 MHz clock, with no crystal, running a blink built for 8 MHz. The whole build, an ATmega328P on its 8 MHz clock 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.
The code
The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.
// Blink, on a Pro Mini running at 8 MHz from 3.3 V.
//
// The LED is on pin 13, as it is on an Uno, so LED_BUILTIN is 13 here too.
// What is different is underneath: this image was built with F_CPU set to
// 8 MHz, so delay(500) counts half as many timer ticks as it would on a 16 MHz
// board and still lasts half a second. Load the Nano's blink onto this board
// instead and it flashes at half the speed, which is what happens on the
// bench when the board setting in the IDE is wrong.
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.
- 1 × ATmega328P, 8 MHz internal clock
- 1 × Full-size breadboard
- 1 × Power, 5 V
- 1 × Resistor, 10k Ω
- 1 × Resistor, 220 Ω
- 1 × LED, red
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, 8 MHz internal clock pin VCC; ATmega328P, 8 MHz internal clock pin AVCC; Resistor, 10k Ω pin 1
- Ground: ATmega328P, 8 MHz internal clock pin GND; ATmega328P, 8 MHz internal clock pin GND; LED, red pin C
- ATmega328P, 8 MHz internal clock pin RESET; Resistor, 10k Ω pin 2
- ATmega328P, 8 MHz internal clock 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.