I am designing a project with a atmega 2560 with a minimal footprint on a PCB, so i figured i could use the Arduino as ISP feature and program the chip via an ICSP breakout. I used the Arduino Mega 2560 reference design to design the board. I'm 90% sure the oscillator oscillating, everything is getting power, and the proper decoupling caps are in, but I am getting the error "Yikes! invalid device signature" when i try to upload a sketch. I looked at the verbose and saw this
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xffffff (probably .reduced_core_tiny)
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Anybody know what is wrong or how to fix it? Any help would be appreciated
Lots of missing info here... You never said you installed a bootloader. Please detail all the steps you’ve done or at least confirm the bootloader flashed okay.
avr_fred:
Lots of missing info here... You never said you installed a bootloader. Please detail all the steps you’ve done or at least confirm the bootloader flashed okay.
I have not flashed a bootloader. Upon further research I understand i need to flash the bootloader in order to set the fuses properly. Is this correct?
I tried flashing the bootloader using the ArduinoIDE, but now im getting the invalid device signature error 0x00ff00
I also tried using the Nick Gammon tutorial for bootloading the chip, but the serial monitor reads "Attempting to enter ICSP programming mode................u%⸮⸮⸮t*9⸮.⸮-⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮u[⸮}⸮" and nothing else.
So at this point nothing is working on the chip and I dont know whats wrong.
what other info do you need? i have verified the physical connections so i dont think thats the issue.
Connections to what are one of many questions. Which Arduino model are you using as the programmer? Did you successfully compile and flash the “Arduino as ISP” sketch to that board being used as the programmer?
You do not need to change fuse settings in order to flash a bootloader. The Arduino IDE takes care of that for you when using the “flash bootloader” function.
Please attach a schematic of your 2560 target board. If you cannot attach it to a post, PM it to me and I’ll get it into the thread. A photo of your programmer to target board connections would be helpful as well.
avr_fred:
Connections to what are one of many questions. Which Arduino model are you using as the programmer? Did you successfully compile and flash the “Arduino as ISP” sketch to that board being used as the programmer?
You do not need to change fuse settings in order to flash a bootloader. The Arduino IDE takes care of that for you when using the “flash bootloader” function.
Please attach a schematic of your 2560 target board. If you cannot attach it to a post, PM it to me and I’ll get it into the thread. A photo of your programmer to target board connections would be helpful as well.
Thank you for your interest i really appreciate it, and i apologize for being unclear, this is my first time trying to make a standalone board and i feel a little overwhelmed. I am using an elegoo mega2560 as the programmer, and the ArduinoISP sketch uploads to it fine. I am using the ICSP breakout to the right of the chip and have the MOSI, MISO, and SCK pins attached to the respective pins on the target chip. The target board will have an microSD card reader attached, so to save space i am using the SPI pins on the target board to attempt to burn the bootloader. This tutorial http://soc.ninja/documentation/programming-atmega2560-with-arduino-uno-or-mega/ says to connect pin 53 on the programmer to the reset pin on the target chip, while the ArduinoISP sketch says to use pin 10, both of which i have tried and get the same result. Now the device signature is being read as 0x000000. I am supplying an external 5V and GND to the target chip using a usb adapter. I attached the target board schematic, pictures of the connections between the programmer and target chip, and a picture of the target chip. The empty pads by the edge had a diode and cap on them, but i tried to simplify the circuit for now down to just the 10k pullup resistor to keep components at a bare minimum. I used a multimeter to verify the conductivity of the connections between the programmer and target chip and to make sure all the vcc pins were getting 5V. The info on programming standalone atmega2560s is kind of sparse, so i could just be plugging my wires into the wrong places,. Any thoughts? Let me know if you need more info.
The 0x000000 signature can be many causes, it’s simply not able to communicate with the chip. Did you successfully change any fuse bits? I doubt it but just want to confirm as a factory fresh chip should always flash okay at least the first time since it defaults to the internal clock. Once fuse bits are changed, an incorrect clock configuration can appear to brick a chip.
Go into the ide preferences and turn on verbose upload and try again, posting the result from the output window of ide using the </> icon (code tags). That will hopefully provide some clues.
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.10.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM3
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Error while burning bootloader.
This was the verbose, i don't have any way of testing if the external clock is working properly, but i could find out in a couple of days when i can get my hands on an oscilloscope. To my knowledge, i haven't changed any of the fuse bits.
One other thing that could've happened is heat damage while soldering. I haven't worked much with this chip so i don't know how sensitive it is to heat but while i was soldering the chip got extremely hot from me being stupid and leaving the iron on a pad too long.