Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] Programming Atmega328P with Arduino uno

Status
Not open for further replies.

tauseefrehman

Junior Member level 1
Joined
Dec 6, 2011
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,392
Hi, i have a question that can i program Atmega328p with arduino uno by just replacing it with its default chip and uploading the sketch to it and then putting it back to my own circuit.
for example interfacing LCD with Atmega328p in 4 bit mode. or in other words if i compile a sketch for arduino uno and add the hex file to the microcontroller in Proteus instead adding it to the arduino.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,524
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
You can do like that but your ATMEga328P's should have bootloader already loaded. I have a few ATMega328P's with bootloader loaded to it. I just plug them into Arduino UNO and then connect Arduino UNO to PC and then upload sketches or if it is .hex file then I use MegunoLink Pro.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,524
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
You connect AVRISP mkII programmer to Arduino UNO or Mega2560. There is ICSP connector on these boards. Then connect programmer to PC using USB cable. Then power the UNO or Mega2560 using external power supply or using another usb cable. Now download and install MegunoLink Pro (trial). In that open "Program Devices". A new tab will come with name Program Devices. In that click the small window icon which has a green + symbol.

The programmer options opens. load .hex file (optiboot .hex file from optiboot folder) to source box. In drop down list boxes select AVRISP mkII and Arduino board based on type then select COMx port to which AVRISP mkII is connected to. The click Program button and .hex file (bootloader) will be loaded. Initially bootloader has to be loaded to Arduino boards. After this bootloader is written to Arduino you can remove programmer and external power supply to Arduino and then connect Arduino board to PC using USB cable and then load whatever sketch you want from Arduino IDE software.

MegunoLink Pro can be downloaded from here.

https://www.megunolink.com/downloads/...egunolink-pro/
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top