Phipps Electronics

Order within the next 

FREE SHIPPING OVER $199

50,000+ ORDERS

WORLDWIDE SHIPPING

SSL SECURED

How to Program an ATMEGA328P Standalone – Arduino IDE

Contents

This article continues from How to Program an ATMEGA328P Standalone – Modes and Wiring. Get to know actual programming in Arduino IDE.

Introduction

Last time, you learned the modes and how to wire your ATMEGA328P for standalone programming. This time, you’ll learn how to program your ATMEGA328P in Arduino IDE. Arduino IDE is powerful software that can be programmed in different modes, such as serially or through an ISP programmer.

How to Program an ATMEGA328P through an ISP Programmer in Arduino IDE

Choose an ISP Programmer

There are several ISP programmers available in the market today that you can choose from. It may be a USBTinyISP, USBasp, AVRISP, ArduinoISP, and others. You can even use an Arduino as an ISP; just make sure you program the Arduino with AruinoISP code from the Examples code section. Go ahead an connect your ISP programmer.

Go to Tools -> Programmer -> then choose your ISP programmer.

Choosing an ISP Programmer

Choose Arduino UNO as Board

Choose the Arduino UNO as a Board since the Arduino UNO has an ATMEGA328P chip inside it. Go to Tools -> Board -> Arduino AVR Boards, then choose Arduino UNO. Go ahead and make sure your ISP connections are correct on your board.

Burn the Bootloader

If you use an ISP programmer, you can burn the bootloader on the chip. Doing so, you’ll be able to program your chip next time using only a USB-to-Serial converter module. You’ll also be able to save the default values of the fuses when burning the bootloader. Simply go to Tools -> Burn Bootloader to complete the operation.

Burn the Bootloader on ATMEGA328P chip

Program your Code through Upload using Programmer

Create or load your code. You can program your code on the ATMEGA328P using ISP easily by clicking Sketch -> Upload using Programmer.

Program an ATMEGA328P through a USB-to-Serial Module in Arduino IDE

If you’ve burned a bootloader on your ATMEGA328P using ISP, you can easily program the chip by only using a USB-to-Serial converter module. Wire your module properly and then follow the steps.

Choose the COM Port of your USB-to-UART Module

Choose Arduino UNO as your Board

Go to Tools -> Board -> Arduino AVR Boards -> Arduino UNO

Upload your Code using the Upload tool icon

Finally, upload your program using the Upload tool icon above.

SUBSCRIBE FOR NEW POST ALERTS

Subscribe to be the first to know when we publish a new article!
List Subscriptions(Required)

POPULAR POSTS

Scroll to Top