Author Topic: Programming custom Atmega2560 using Arduino  (Read 3273 times)

0 Members and 1 Guest are viewing this topic.

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 488
Programming custom Atmega2560 using Arduino
« on: October 31, 2016, 04:37:58 pm »
1. I have made a customized board using Atmega2560. Code is made using Arduino 1.6.5. Currently I am testing my code on arduino Atmega2560 board. Now have to shift code to customized Atmega2560 board.

2. Have both uno & Atmega2560 arduino boards. How to program the customized board, so that next time onwards I can program customized board directly from arduino IDE 1.6.5.

3. I was reading this: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
Shows how to program ATmega328using arduino uno. In this MCU on arduino uno board has to be removed. But in my case I have Atmega2560, which is SMD so I cannot remove it. So how to do it?
 

Offline pyroesp

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: Programming custom Atmega2560 using Arduino
« Reply #1 on: October 31, 2016, 08:22:20 pm »
I think this is what you are looking for : https://www.arduino.cc/en/Tutorial/ArduinoISP

EDIT: My bad, that's the same link.

This is specifically for arduino megas : http://playground.arduino.cc/Code/MegaISP
« Last Edit: October 31, 2016, 08:37:25 pm by pyroesp »
 

Offline Ammar

  • Regular Contributor
  • *
  • Posts: 154
  • Country: au
Re: Programming custom Atmega2560 using Arduino
« Reply #2 on: November 01, 2016, 09:57:44 am »
If you are going to be programming a lot of atmel microcontrollers, it may be worth buying an avrisp. Cheaper than having an arduino dedicated to the task. I think you can just hold shift and click download program in the arduino IDE with it and you're done.
 

Offline Aeternam

  • Supporter
  • ****
  • Posts: 97
  • Country: lu
    • Schartz Engineering
Re: Programming custom Atmega2560 using Arduino
« Reply #3 on: November 01, 2016, 01:43:08 pm »
+1 on the dedicated programmer. I'm using the ATMEL-ICE, works very well.

Then, if you make the switch to Atmel Studio you can even debug your program using a decent debugger while it's running on the MCU, beats printing out debug statements through the Arduino serial interface.
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: pl
Re: Programming custom Atmega2560 using Arduino
« Reply #4 on: November 01, 2016, 01:50:05 pm »
I didn't want to be the first guy to go off-topic and suggest growing out of the Arduino sandbox ;) But since the thread is already gravitating towards this conclusion: please do! You've made your own custom board. Take it as an opportunity to switch to the proper development environment. Get yourself an Atmel ICE, switch to Atmel Studio and you'll never look back.
 
The following users thanked this post: Dave

Offline pyroesp

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: Programming custom Atmega2560 using Arduino
« Reply #5 on: November 01, 2016, 08:09:45 pm »
When I programmed AVR I used a homemade USBasp. Always worked flawlessly.
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Programming custom Atmega2560 using Arduino
« Reply #6 on: November 01, 2016, 08:21:04 pm »
A $2 Asian Nano board running the ArduinoISP sketch will serve your need. Arduino IDE allows uploading of sketch using programmer, so Bob's you uncle.

 

Offline rrinker

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: Programming custom Atmega2560 using Arduino
« Reply #7 on: November 03, 2016, 06:31:24 pm »
 Yeah. I was thinking about the AVRisp, my project will be using dozens of ATTiny85's. The first test ones, I just used ArduinoISP and wired it up to one of my Unos. But for $5 in parts (probably less, actually) I can wire it up as a shield with a nice socket for the chip to be programmed. They're all getting blasted with the same code. ArduinoISP should be plenty adequate. I'll also be using a lot of Nanos, but I've found a nice source of bulk packages that come without the header pins soldered on - that takes a few seconds per board, and then they too get blasted with the standard code for that part of the project and are ready to plug in and go.


 

Offline Vindhyachal.taknikiTopic starter

  • Frequent Contributor
  • **
  • Posts: 488
Re: Programming custom Atmega2560 using Arduino
« Reply #8 on: November 06, 2016, 03:07:24 pm »
I bought USBasp programmer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf