Introduction: Configure Arduino IDE for Atmega 328P to Use 8MHz Internal Clock
If you are making Arduino on breadboard using Atmel Atmega 328P then traditionally you need a 16MHz crystal and a couple of capacitors. But in some cases, we don't have crystal or capacitors.
To solve this problem, we can configure Atmel Atmega 328P with internal 8MHz crystal. To do this we need to configure Arduino IDE to program the Breadboard Arduino using internal 8MHz clock oscillator (Crystal).
If we successfully configure Arduino IDE to use 8MHz clock of Atmel Atmega 328P, we no longer need to attach capacitors and crystal to Atmel Atmega 328P.
Just follow the following instructions to make programming for Atmel Atmega 328P easier.
Step 1: Download the .zip File
First of all download breadboard.zip file, attached with this step and extract it. Please don't mess up with the folder named "breadboard" after extraction because it can cause change in fuse settings for Atmel Atmega 328P.
Attachments
Step 2: Open Arduino IDE
After the extraction of folder from .zip file, open the Arduino IDE Installed on your computer. (I recommend Windows).
Step 3: Open Preferences of Arduino IDE
When you opened Arduino IDE, then open Preferences from File menu of Arduino IDE, as shown in figure.
Step 4: Copy Sketchbook Location
When Preferences of Arduino IDE opened, then copy the address of Sketchbook Location. This is also shown in given figure.
After this step, close Arduino IDE.
Step 5: Open File Explorer
After copying of Sketchbook Location address, open This PC or File Explorer. Now, click on address bar of File Explorer or This PC and paste the Sketchbook Location address which you copied from Preferences of Arduino IDE. Then press Enter.
Step 6: Hardware Folder
After opening the Sketchbook Location, you'll see a folder named "hardware". If you don't see any hardware folder then make a new folder and name it as hardware. Now open the hardware folder. This step is shown in figure.
Step 7: Placing "breadboard" Folder
When hardware folder is opened, then copy the extracted folder named "breadboard" from Step-1 of this tutorial and paste it inside hardware folder. this is shown in given figure.
Step 8: Confirmation
After you successfully paste "breadboard" folder in hardware folder, open Arduino IDE installed on your computer and open Tools>Board: . Now, scroll to the bottom of the drop-down menu and you'll see a option named "Atmega 328 on breadboard".
This means that you have successfully configured Arduino IDE to use Internal 8MHz Clock of Atmel Atmega 328P for programming. Now, you can use this option to program Atmel Atmega 328P to program without crystal and capacitors.
This step is also shown in attached figure.
2 People Made This Project!
- Darren Lewis made it!
- Eric Brouwer made it!
9 Comments
7 months ago
this worked for me
7 months ago
This post is very useful. I tried before during hours and hours to do this.
Thanks a lot.
Michel
Question 12 months ago
Dear, I have some knowladge about Arduino. I tried to upload Arduino program to ATMEGA328P . I followed your instruction.I have successfully configured Arduino IDE to use Internal 8MHz Clock of Atmel Atmega 328P. But couldn't upload the program because of some error.I used CP2102 adapter. It is working. That is the one, I'm using to upload program to Arduino mini. The error massage :
Please help.
1 year ago
Maybe change the bootloader on the chip first using an external programmer? because the fuse bits need to be changed, and it cant be done with "regular upload" on the Arduino IDE.
1 year ago
I Would think you use a serial programmer to upload the the code to that board name...
Question 1 year ago
Thanks for the instructions
Question 1 year ago on Step 5
Hi, thanks for your help in advance. The problem I'm having is the system doesn't seem to be able to work with the "Internal 8MHz Clock of Atmel Atmega328P" programmer. The error message I'm getting is "avrdude: stk500_recv(): programmer not responding
avrdude:stk500_getsync() attempt 10 of 10: not in sync: resp=0xd5". Any help would be greatly appreciated.
Question 2 years ago on Step 1
Hello, I see the post below, but I don't see a real answer to the question. I'm new to programming and am trying to learn myself. I did what the instruction said to do and the download loaded. I do have the ATmega328 on a breadboard to select, but after selecting it and trying to program the micro controller I get the error "programmer is not responding" then the download times out. I can revert back to the Arduino/Genuino Uno and the controller will program, but I still get the warning about Breadboard avr atmega328bb doesn't define .....................
I get this warning on both boards selected. See image attached. Is there any fix for these?
If you look in the bottom right corner of each screenshot you can see what board was selected.
Thanks,
3 years ago
Exactly What I need, BUT I get this error :(
"Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes of dynamic memory.
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
Wrong microcontroller found. Did you select the right board from the Tools > Board menu?"