There seems to be post after post from people having problems uploading their sketches to their chips, particularly for those chips which are less "mainstream".
The project below attempts to address that.
It uses a Uno as a stand-alone programmer. It reads the file you wish to program from an SD card (you need an SD card shield, or a card adapter like the one I used).
You compile the file in the IDE, copy it to the SD card, hook your chip up as shown, and then run the sketch. Example session:
Atmega hex file uploader.
Written by Nick Gammon.
Version 1.0
Reading SD card ...
HEX files in root directory:
BLINK2~1.HEX : 4595 bytes. Created: 2012-05-11 07:47:40. Modified: 2012-05-11 10:50:06
OPTI328.HEX : 1467 bytes. Created: 2011-11-29 10:11:44. Modified: 2011-11-29 10:11:44
MEGA2560.HEX : 22989 bytes. Created: 2011-11-29 10:11:44. Modified: 2011-11-29 10:11:44
ATMEGA8.HEX : 2870 bytes. Created: 2011-11-29 10:11:44. Modified: 2011-11-29 10:11:44
LILYPAD.HEX : 5484 bytes. Created: 2010-09-25 22:52:34. Modified: 2010-09-25 22:52:34
SKETCH~1.HEX : 170228 bytes. Created: 2012-05-11 09:40:24. Modified: 2012-05-11 09:40:24
LARGE_~1.HEX : 170228 bytes. Created: 2012-05-11 10:54:48. Modified: 2012-05-11 10:54:48
BLINK3.HEX : 3061 bytes. Created: 2012-05-11 11:08:00. Modified: 2012-05-11 11:08:00
---------
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0xE2
HFuse = 0xDB
EFuse = 0xFD
Lock byte = 0xFF
---------
Choose a file [ ] ...
Processing file: BLINK3.HEX
Checking file ...
##
Lowest address = 0x0
Highest address = 0x439
Bytes to write = 1082
No bootloader.
Suggest making high fuse = 0xDB
Type 'V' to verify, or 'G' to program the chip with this file ...
Processing file: BLINK3.HEX
Erasing chip ...
Writing flash ...
#########
Written.
Processing file: BLINK3.HEX
Verifying flash ...
########
No errors found.
No bootloader.
Setting high fuse = 0xDB
Done.
In this case the whole process took a couple of seconds.
More details, and source code here:
This is a bit of a work-in-progress, but if anyone would like to download it and test it, any feedback is welcome.
You can use this to upload "standalone" sketches, or bootloaders.
Here is an example of uploading a somewhat larger file to a Mega2560.
Atmega hex file uploader.
Written by Nick Gammon.
Version 1.0
Reading SD card ...
HEX files in root directory:
BLINK2~1.HEX : 4595 bytes. Created: 2012-05-11 07:47:40. Modified: 2012-05-11 10:50:06
OPTI328.HEX : 1467 bytes. Created: 2011-11-29 10:11:44. Modified: 2011-11-29 10:11:44
MEGA2560.HEX : 22989 bytes. Created: 2011-11-29 10:11:44. Modified: 2011-11-29 10:11:44
ATMEGA8.HEX : 2870 bytes. Created: 2011-11-29 10:11:44. Modified: 2011-11-29 10:11:44
LILYPAD.HEX : 5484 bytes. Created: 2010-09-25 22:52:34. Modified: 2010-09-25 22:52:34
SKETCH~1.HEX : 170228 bytes. Created: 2012-05-11 09:40:24. Modified: 2012-05-11 09:40:24
LARGE_~1.HEX : 170228 bytes. Created: 2012-05-11 10:54:48. Modified: 2012-05-11 10:54:48
BLINK3.HEX : 3061 bytes. Created: 2012-05-11 11:08:00. Modified: 2012-05-11 11:08:00
---------
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x98 0x01
Processor = ATmega2560
Flash memory size = 262144 bytes.
LFuse = 0xFF
HFuse = 0xD9
EFuse = 0xFD
Lock byte = 0xFF
---------
Choose a file [ ] ...
Processing file: LARGE_~1.HEX
Checking file ...
################################################################
###############################
Lowest address = 0x0
Highest address = 0xEC65
Bytes to write = 60518
No bootloader.
Suggest making high fuse = 0xD9
Type 'V' to verify, or 'G' to program the chip with this file ...
Processing file: LARGE_~1.HEX
Erasing chip ...
Writing flash ...
################################################################
################################################################
################################################################
#############################################
Written.
Processing file: LARGE_~1.HEX
Verifying flash ...
################################################################
################################################################
################################################################
############################################
No errors found.
No bootloader.
Setting high fuse = 0xD9
Done.
The whole process took about 50 seconds.