I backed a Kickstarter project a couple years back, the project ended up flopping in the end but they still made good on the hardware but it's useless without their website to drive it. I'm wanting to reprogram it myself to make the hardware useful but can't seem to get connected to it.
It's driven by an AT MEGA 2560V-8AU but I can't seem to push any code to it.
I'm plugged into it with a 5V FTDI breakout board. If I try to upload any code, it says:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Attempting to burn Bootloader with AVRISP mkII I get:
avrdude: usbdev_open(): did not find any USB device "usb"
Attempting to burn Bootloader with Arduino ISP I get:
Attempting to burn Bootloader with AVRISP mkII I get:
avrdude: usbdev_open(): did not find any USB device "usb"
Do you actually HAVE an AVRISP programmer? The above error indicates an error prior to actually involving the target chip? The other errors are consistent with not having a bootloader.
Hah! I'm obviously new at this...I just realized those are hardware programmers....not software programmers. So, I have an Arduino Uno, can I use that to program a 2560 or do you need to program from the same kind of chip? Or do you suggest something else? Thanks for your guidance.
What is the system clock speed of your ATMEGA 2560V-8AU equipped board?
8 MHz?
You'll likely need to define a new boards.txt entry with the slower clock speed.
Find the file /Arduino/hardware/arduino/boards.txt and add a new section something like this, assuming an external 8 MHz crystal - if using the internal 8 MHz clock source the fuses will need some changes:
No, you can change the crystal to an 8 MHz part.
Or the internal 8 MHz oscillator, that's just a fuse change.
Do you have a programmer? I recommend Atmel AVR ISP MKii, it's what I use for all my programming.
Burn the bootloader first to set the fuses per boards.txt settings, then
File:Upload Using Programmer to load the sketch with no bootloader, or
use a USB/Serial module to upload via the serial port (Rx/Tx on D0/D1).
Please run my chip detector sketch then copy and paste the output here.
The standard bootloader expects to operate at 16 MHz.
If you are getting varying results it sounds a bit like hardware. What cables are you using for programming? What FTDI board? I presume you are getting further than in your first post?
Hmm, I'm seeing in the parts list that is has a 3.3V Voltage Regulator, MIC5219-3.3YM5. Could it be as simple as I need to be using a 3.3V FTDI Breakout board??
I'm not sure about the decoupling capacitors.
I think I'm getting further, at least it appears to be trying to do something now instead of just communication errors.
Here's the output of the board detector, had to cut off most of the bootloader due to length, let me know if you needed that. Thanks!
Atmega chip detector.
Written by Nick Gammon.
Version 1.12
Compiled on Feb 21 2015 at 18:50:39
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 1E 98 01
Processor = ATmega2560
Flash memory size = 262144 bytes.
LFuse = FF
HFuse = D8
EFuse = FD
Lock byte = EF
Clock calibration = A5
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 8192 bytes starting at 3E000
Bootloader:
3E000: 0D 94 89 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E010: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E020: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E030: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E040: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E050: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E060: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E070: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E080: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E090: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E0A0: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E0B0: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E0C0: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E0D0: 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1 0D 94 B2 F1
3E0E0: 0D 94 B2 F1 41 54 6D 65 67 61 32 35 36 30 00 41
............................................
Too long to post it all. Let me know if relevant.
MD5 sum of bootloader = 12 AA 80 07 4D 74 E3 DA BF 2D 25 84 6D 99 F7 20
Bootloader name: atmega2560_bootloader_watchdog_bug_fixed
First 256 bytes of program memory:
0: 72 C0 00 00 9A C0 00 00 98 C0 00 00 96 C0 00 00
10: 94 C0 00 00 92 C0 00 00 90 C0 00 00 8E C0 00 00
20: 8C C0 00 00 8A C0 00 00 88 C0 00 00 86 C0 00 00
30: 84 C0 00 00 82 C0 00 00 80 C0 00 00 7E C0 00 00
40: 7C C0 00 00 7A C0 00 00 78 C0 00 00 76 C0 00 00
50: 74 C0 00 00 72 C0 00 00 70 C0 00 00 D5 C6 00 00
60: 6C C0 00 00 C8 C0 00 00 16 C2 00 00 66 C0 00 00
70: 64 C0 00 00 62 C0 00 00 60 C0 00 00 5E C0 00 00
80: 5C C0 00 00 5A C0 00 00 58 C0 00 00 56 C0 00 00
90: F2 C0 00 00 3F C2 00 00 50 C0 00 00 4E C0 00 00
A0: 4C C0 00 00 4A C0 00 00 48 C0 00 00 46 C0 00 00
B0: 44 C0 00 00 42 C0 00 00 40 C0 00 00 3E C0 00 00
C0: 3C C0 00 00 3A C0 00 00 38 C0 00 00 14 C1 00 00
D0: 60 C2 00 00 32 C0 00 00 4E C1 00 00 99 C2 00 00
E0: 2C C0 00 00 7A 04 11 24 1F BE CF EF D1 E2 DE BF
F0: CD BF 00 E0 0C BF 12 E0 A0 E0 B2 E0 EC E3 F0 E1
The sumcheck matches the bootloader, so clearly you have the bootloader there.
The fuses are set for an external crystal. If you have a 16 MHz one that should be fine.
Hmm, I'm seeing in the parts list that is has a 3.3V Voltage Regulator, MIC5219-3.3YM5. Could it be as simple as I need to be using a 3.3V FTDI Breakout board??
What is the supply voltage for your board?
Does your sketch have "???" in it somewhere?
I'm not sure about the decoupling capacitors.
Your board should have 0.1 µF capacitors between +5V (or whatever Vcc is) and Gnd in a number of places.
Ok, more info....I just realized that even though it's spitting out those avrdude: verification errors, it's actually uploading the sketch! At least part of it...I uploaded the ASCIITable sketch and it outputs.
and that's followed by a bunch of block symbols that scrolls off the screen.
I uploaded the original device firmware and it seems to spit out all relevant information in the serial monitor...but it concerns me that the upload always ends in a avrdude: verification error, and I don't think that ASCII Table output is complete....