Program an ATmega168/328 with codebender

If you want to use an inexpensive ATmega168 or ATmega328p for your project, but you want the simplicity of the arduino code and codebender, this tutorial will guide you through!
A brand new ATmega microcontroller does not come preconfigured to use with Arduino code. So to use one of these you normally need a high cost ATMEL ISP programmer to burn the Arduino bootloader into your ATmega. Thankfully there is an alternative way, using an existing Arduino board as an ISP.
Program an ATmega168/328 with codebender

Step 1: What you will need

-A breadboard
-An Arduino board (i.e. Arduino UNO)
-The ATmega microcontroller you want to program (ATmega 168/328)
-An FTDI basic board or FTDI cable
-A 16MHz crystal
-A 10k resistor
-Two 18 to 22 pF (ceramic) capacitors
-An 100 nF (ceramic) capacitor
The Arduino board will be needed only once, to burn the bootloader to the ATmega and the FTDI will be needed each time you want to reprogram your ATmega.

Step 2: Connecting the ATmega to the Arduino

Connecting the ATmega to the Arduino

On the breadboard we have the standard standalone ATmega setup. Note that we use the 2 capacitors of 18-22pF. We also need to connect 4 cables to the Arduino pins 10-13 to use it as a programmer.

Step 3: Program your Arduino

Thanks to codebender this is a piece of cake! Under the code below, select your Arduino device, the correct port, and click “Run on Arduino”.
(If you do not have the codebender plugin in your browser, under the code below, you will see a download/install link)

 
For more detail: Program an ATmega168/328 with codebender


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top