Arduino board
LED
220 Ω resistor
const int led_pin = 8 ;
void setup ()
{
pinMode (led_pin , OUTPUT );
}
void loop ()
{
digitalWrite (led_pin , HIGH );
delay (1000 );
digitalWrite (led_pin , LOW );
delay (1000 );
}
Bare microcontroller on breadboard
Download this hardware configuration archive: breadboard-1-6-x.zip
Create a "hardware" sub-folder in your Arduino sketchbook folder (whose location you can find in the Arduino preferences dialog).
Move the breadboard folder from the zip archive to the "hardware" folder of your Arduino sketchbook.
Restart the Arduino software.
You should see "ATmega328 on a breadboard (8 MHz internal clock)" in the Tools > Board menu.
Wire up the Arduino board and microcontroller as shown in the EAGLE schematic.
Select "ATmega328 on a breadboard (8 MHz internal clock)" as the board type using Tools > Board.
Select "Arduino as ISP" from Tools > Programmer
Run Tools > Burn Bootloader
After burning the bootloader, you can remove the jumper wires connected to pins 10, 11, 12, and 13 of the Arduino board.
Uploading sketches to microcontroller on breadboard
Wire up the Arduino board and microcontroller as shown in the next EAGLE schematic.
Select "ATmega328 on a breadboard (8 MHz internal clock)" as the board type using Tools > Board.
Upload the sketch as usual (Ctrl+U, or Sketch > Upload, or the right arrow button).
Lighting an LED using microcontroller on breadboard
Before uploading the LED blinking sketch we wrote earlier, change led_pin
to 9. Then upload the sketch to the microcontroller on the breadboard.
Wire up the Arduino board and microcontroller as shown in the next EAGLE schematic.
If the correct sketch was uploaded to the microcontroller, you should see the LED blinking.