This microcontroller it is used by Arduino and we can load programs into the microcontroller using the Arduino board connected with USB to the computer and using the Arduino IDE to code the atmega328 programs.
Schematic
Atmega328 it has an internal 8Mhz clock, it needs a 10k resistance between Vcc and pin 1. In the pins 9 and 10 you need to add a 16Mhz crystal quartz clock with two 22pF ceramic capacitors connected to Gnd, this is the connection on the breadboard.
The led it's optional
AREF which means Analog reference it's the reference used for the analog input pins and the AREF will be the top of the input range.
Program Bootloader
For load programs into an Atmega328 you need to add first the bootloader, then you will need an Arduino which has the Programmer code to load the bootloader into an Atmega328 microcontroller connecting it to the Arduino board. Thanks to Nick Gammon here is a custom programs to put into the Atmega328 using Arduino IDE.
First, add the programmer program to the arduino board. You need to go to his GitHub account and go into Atmega_Board_Programmer then open the Atmega_Board_Programmer.ino with the Arduino IDE and run it into the Arduino.
Once you have the programmer code into the Arduino board you need to connect the Arduino board to the Atmega328 you want to add the bootloader like this picture:
Then you can go to the Arduino monitor and change the baud configuration to 1152000 then you will se the instructions to load the bootloader, (press U for 16Mhz then G to run the bootloader and if you want to load more bootloaders into another atmega328 then press C to repeat the process)
This microcontroller it is used by Arduino and we can load programs into the microcontroller using the Arduino board connected with USB to the computer and using the Arduino IDE to code the atmega328 programs.
Schematic
Atmega328 it has an internal
8Mhz
clock, it needs a10k
resistance betweenVcc
andpin 1
. In the pins 9 and 10 you need to add a16Mhz
crystal quartz clock with two22pF
ceramic capacitors connected toGnd
, this is the connection on the breadboard.The led it's optional
AREF
which means Analog reference it's the reference used for the analog input pins and theAREF
will be the top of the input range.Program Bootloader
For load programs into an Atmega328 you need to add first the bootloader, then you will need an Arduino which has the Programmer code to load the bootloader into an Atmega328 microcontroller connecting it to the Arduino board. Thanks to Nick Gammon here is a custom programs to put into the Atmega328 using Arduino IDE.
First, add the programmer program to the arduino board. You need to go to his GitHub account and go into Atmega_Board_Programmer then open the
Atmega_Board_Programmer.ino
with the Arduino IDE and run it into the Arduino.Once you have the programmer code into the Arduino board you need to connect the Arduino board to the Atmega328 you want to add the bootloader like this picture:
Then you can go to the
Arduino monitor
and change thebaud
configuration to1152000
then you will se the instructions to load the bootloader, (pressU
for16Mhz
thenG
to run the bootloader and if you want to load more bootloaders into another atmega328 then pressC
to repeat the process)References
Make Your Own Arduino Board | Atmega168/328 IC How To Make Your Own Arduino Board at Home! Nick Gammon resources Best way to burn arduino bootloaders tutorial How to burn bootloader into Arduino micro From Arduino to a Microcontroller on a Breadboard