Programing Homemade Mega 2560 using UNO

Hello,

I have created a board using the 2560, I have had no problems burning the bootloader using my normal mega, but I cannot get it to succeed in uploading blink. Can anyone tell me the correct pins to hook up my uno to my mega? and the correct settings for arduino IDE?

Can you post the picture and schematic of your board ?
How you try to upload blink ? What is the error ?

-Malhar

Would you want the eagle files? I keep getting sync errors. Im pretty sure I dont know what im doing when it comes to programing the chip, as all google wants to tell me is how to bootload the damn thing.

Sometimes I also get a timeout, I have a TL232R that I have also been trying but I cannot for the life of me get my code uploaded to the board. At one point I had loaded the bootloader from the Arduino ide and a that point serial would spit back what I had typed.

Will you post the errors in code tags ??click </> for code tags.
Yes,Eagle files will do.
-Malhar

darkipod:
Hello,

I have created a board using the 2560, I have had no problems burning the bootloader using my normal mega, but I cannot get it to succeed in uploading blink. Can anyone tell me the correct pins to hook up my uno to my mega? and the correct settings for arduino IDE?

Burning the bootloader is done by means of an external programmer, such as another Arduino, connected to the SPI header or pins of your target AVR. For Optiboot, you can verify that it's working by connecting an LED ( through a 220 Ohm resistor) to (Arduino equivalent) pin 13 (or port PB5 - not sure about the 2560) which will blink trice at power up or reset, or blink continuously until you upload your first sketch via the bootloader.

Uploading a sketch once the bootloader is present, is done over the serial port (0 on chips with multiple UARTs, like the 2560) by connecting an USB to serial adapter, such as an FTDI adapter.

Here are the eagle files. As far as Errors go I get different ones sometimes.

Iv been asking for a while for how to actually setup my board to receive code, as I believe that is where the problem lies. If only I could program over ICSP then all would be good.

My bootloaded Arduinos do blink continuously on DO13, however I cannot get a successful write over UART_0.

avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer

eagle.zip (135 KB)

setup everything as you do to bootload. press ctrl+shift+U to upload using programmer.

-Malhar

wait, are saying I can upload using ICSP?

Yes, if you have a Programmer.
File:Upload Using Programmer uploads via the ICSP header.

This picture shows a Programmer being used to Bootload a part, or to Upload a sketch, with power provided from the USB interface (as the Atmel AVR ISP MKii does not provide power, it only monitors the level of voltage on the ICSP header (unless one has hacked it to provide power; lots of options:
Google)

I do not have a programmer, can I do this using an arduino uno, thats what I used to burn the bootloader.

Yes, you can use an Uno as a Programmer, that's what you did when you installed the bootloader.

Thanks! I will try to program using this method, as all signs point to the bootloader working just fine!

I still cannot get blinky light to upload, currently this setup is able to burn the bootloader, but I cannot upload the blinky code.

Here is a picture of my current setup in the attachments.

The error I am getting in this setup is:
Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 1,518 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8,183 bytes for local variables. Maximum is 8,192 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Can anyone tell me if the fuses look good?

Atmega fuse calculator.
Written by Nick Gammon.
Version 1.11
Compiled on Apr 15 2016 at 18:26:42 with Arduino IDE 10607.
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x98 0x01 
Processor = ATmega2560
Flash memory size = 262144
LFuse = 0xFF 
HFuse = 0xD8 
EFuse = 0xFD 
Lock byte = 0xEF 
Clock calibration = 0x8D 
OCD Enable.............................. [ ]
JTAG Enable............................. [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [X]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 8192 bytes.
Start-up time: SUT0: [ ]  SUT1: [ ] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 2.7V.

What is your objective? To upload to the ATmega2560 using a USB to serial connection, or to upload to the ATmega2560 using an Arduino as ISP? Those are 2 completely different things, and your desired fuse settings will vary depending on what exactly you are trying to do.

dmjlambert:
What is your objective? To upload to the ATmega2560 using a USB to serial connection, or to upload to the ATmega2560 using an Arduino as ISP? Those are 2 completely different things, and your desired fuse settings will vary depending on what exactly you are trying to do.

Man at this point all I want to program is a damn blink program.

The only available tools I have to program are, an arduino UNO, an arduino MEGA2560 (dev board not my homemade board), and an FT232R from spark fun. My homemade arduino does not have a reset button, and constantly either gives me that it can't enter programing mode, or that it cannot sync, I have been up for almost 30 hours just trying to blink an LED with this board.

I am so sure that the problem is with my wiring and my settings in the arduino IDE but I cannot find, anywhere, a tutorial for uploading code over either an UNO board or an RS232R. I am desperate for help, I have seen how to program an uno using an uno board but nothing on the mega 2560.

Can you please show me a link to the FT232R you are talking about, or upload a photo of it?
Do you have a 0.1uF capacitor?

Have you done the loop back test with the FT232R to make sure it works ok? That is the test posted at the top of the installation and troubleshooting forum, you would connect RX and TX together and type some stuff in the Serial Monitor and make sure the text comes back.

So here is an image of all the TTL chips I have.


Here is the link for the FT232R from sparkfun:

I have done the loop back test before but I will do it again, and take pictures for you.

Should take me about 5 min, in the past, depending on which bootloader I had loaded, the Nick Gammon bootloader would return garbage, but the Arduino Bootloader from the Arduino IDE would return the exact phrase I entered. I will take as many photos as I can and maybe even try a video.

If you think the FTDI adapter works, that is good enough, don't need to repeat test.