A few months ago, I decided to design my own PCB. I am making a flight computer for my model rockets, and my sketches were growing to be enormous in size. The current version of my flight computer using an Arduino Nano has something like 99% of its space used. I wanted to make a really small version of the Arduino Mega so I could have a crap ton of space to work with. I basically copied the official Arduino schematics except I left out the USB part of it, as well as a lot of pins. I used Seeedstudio to make the PCBs.
Surprisingly, the PCB seems to work fine, the only problems I have encountered are due to me being a novice solderer with those tiny pins. Anyway, I successfully soldered the ATmega2560 to my PCB. I am using an USBasp programmer to program it. I successfully installed the bootloader onto the ATmega2560, and the Arduino IDE has no problem uploading code to it successfully using USBasp.
The problem that I am having is the fact that no matter what I upload to it, the ATmega2560 refuses to execute the code. I do not understand why. Even the simple blink program does not work. I have tried everything that I can think of. Still nothing. Reset is pulled high. Power is 5v. Lots of decoupling caps. Latest version of all software and firmwares. I have been doing some research, and it may be the fuses on the ATmega2560. I am not sure though, any help would be much appreciated!
Be warned, the following was made in Eagle by someone who has yet to master it. I also think I used too much of the autorouter for the board, but it ain't bad for a novice.
Schematic: Here
Board with everything soldered to it: Here
Avrdude when I upload the code:
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
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 : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "C:\Users\JOHNSL~1\AppData\Local\Temp\build9025638294211856625.tmp/Blink.cpp.hex"
avrdude: writing flash (2322 bytes):
Writing | ################################################## | 100% 1.28s
avrdude: 2322 bytes of flash written
avrdude: verifying flash memory against C:\Users\JOHNSL~1\AppData\Local\Temp\build9025638294211856625.tmp/Blink.cpp.hex:
avrdude: load data flash data from input file C:\Users\JOHNSL~1\AppData\Local\Temp\build9025638294211856625.tmp/Blink.cpp.hex:
avrdude: input file C:\Users\JOHNSL~1\AppData\Local\Temp\build9025638294211856625.tmp/Blink.cpp.hex contains 2322 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.66s
avrdude: verifying ...
avrdude: 2322 bytes of flash verified
avrdude done. Thank you.
Fuse Positions:
>avrdude -C ../etc/avrdude.conf -c usbasp -b 19200 -p m2560 -v
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "../etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
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 : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (H:FD, E:D8, L:FF)
avrdude done. Thank you.
Thanks for any help you are able to provide!