Pages: [1]   Go Down
Author Topic: Problem uploading a sketch to ATMEGA2560  (Read 967 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I designed a custom board with an ATMEGA2560 MCU. In order to facilitate "electronics debugging" I'm soldering components as I need.

At this moment, as key components, I have the MCU, the 16MHz crystal, ICSP header and FTDI FT232RL. I managed to burn the bootloader (with an AVRISP MKII connected to the ICSP header) with settings as shown in uploaded images. I can also burn sketches code as .hex files using the AVRISP MKII as well.

The problem occurs when trying to upload sketches directly from Arduino 0022 IDE to the FT232RL on the board. The weird part here is that I can only upload the program  immediately after burning bootloader with AVRISP. Any other tries result on a avrdude timeout.






Any hint?

Many thanks in advance.
« Last Edit: January 13, 2012, 02:32:53 pm by Globe » Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12855
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


You will need to set the "lock bits" to protect the bootloader.  boards.txt (comes with the Arduino IDE) has these settings for Arduino Mega 2560...

mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD

mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Many thanks for your quick reply.

Today I followed your directions and now it works like a charm, allowing me to upload sketches directly from Arduino IDE smiley-grin .

Thanks a lot!
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12855
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


You are welcome.  I'm glad you have it working.
Logged

Pages: [1]   Go Up
Jump to: