Problem with atmega 644

Hi i have some problems trying to upload a sketch to a atmega 644.When I use ardunio 0023 and select "sanguino" under board It will upload fine.However when I use Ardunio 1.0.1 with the updated sanguino core files especially for 1.0.1 I get the following error :

avrdude: Yikes! invalid device signature
double check connections and try again or use-f to override

Some help please ?

Download the maniacbug core files for the 1284P here

and make a new boards.txt entry for the 644.
This has been posted in the forum before, you might be able to find it with a search also.

Update to 1.0.3 while you're at it.

Ok I downloaded ardunio 1.0.3 then I extracted everything in the mighty-1284p-master to ardunio-1.0.3/hardware/ .Then added the following to the boards.txt located in the ardunio-1.0.3/hardware/mighty-1284p-master.

##############################################################

mighty_opt.name=Mighty 1284p 16MHz using Optiboot >> Mighty 644p 16MHz using Optiboot 
mighty_opt.upload.protocol=arduino
mighty_opt.upload.maximum_size=130048 >> 63488?? with 2K bootloader
mighty_opt.upload.speed=115200
mighty_opt.bootloader.low_fuses=0xff
mighty_opt.bootloader.high_fuses=0xde
mighty_opt.bootloader.extended_fuses=0xfd
mighty_opt.bootloader.path=optiboot
mighty_opt.bootloader.file=optiboot_atmega1284p.hex
mighty_opt.bootloader.unlock_bits=0x3F
mighty_opt.bootloader.lock_bits=0x0F
mighty_opt.build.mcu=atmega1284p >> atmega644p
mighty_opt.build.f_cpu=16000000L
#mighty_opt.build.core=arduino:arduino
mighty_opt.build.core=standard
mighty_opt.build.variant=standard

However when "Mighty 1284p 16MHz using Optiboot >> Mighty 644p 16MHz using Optiboot " is selected under boards and I try and upload a sketch I get the following error:

"unknown MCU 'atmega1284p >>atmega644p' specified (then a list of at mega's)

Well here is the entry I made into boards.txt file to support my 644P chip.

##############################################################


bobuino644.name=Bobuino 644P optiboot
bobuino644.upload.protocol=arduino
bobuino644.upload.maximum_size=63488
bobuino644.upload.speed=115200
bobuino644.bootloader.low_fuses=0xff
bobuino644.bootloader.high_fuses=0xdc
bobuino644.bootloader.extended_fuses=0xfd
bobuino644.bootloader.path=optiboot
bobuino644.bootloader.file=optiboot_atmega644p-4-5.hex
bobuino644.bootloader.unlock_bits=0x3F
bobuino644.bootloader.lock_bits=0x0F
bobuino644.build.mcu=atmega644p
bobuino644.build.f_cpu=16000000L
#bobuino644.build.core=arduino:arduino
bobuino644.build.core=standard
bobuino644.build.variant=bobuino

##############################################################

And a copy of the 644P bootloader code was placed into my C:\Documents and Settings\Primary Windows User\My Documents\Arduino\Arduino1\hardware\maniacbug-mighty-1284p\bootloaders\optiboot folder.

optiboot_atmega644p-4-5.hex

:020000000504F5
:10FC0000112484B714BE81FFF2D085E08093810077
:10FC100082E08093C00088E18093C10086E08093F9
:10FC2000C20080E18093C4008EE0CBD0209A86E0B1
:10FC300020E33CEF91E0309385002093840096BB55
:10FC4000B09BFECF189AA8958150A9F7CC24DD244B
:10FC500088248394B5E0AB2EA1E19A2EF3E0BF2E69
:10FC6000A4D0813471F4A1D0082FB1D0023811F49E
:10FC700085E005C0013811F484E001C083E08DD037
:10FC800089C0823411F484E103C0853419F485E01D
:10FC9000A6D080C0853579F488D0E82EFF2485D0A1
:10FCA000082F10E0102F00270E291F29000F111F09
:10FCB0008ED068016FC0863521F484E090D080E05A
:10FCC000DECF843609F040C070D06FD0082F6DD0E1
:10FCD00080E0C81680EED80618F4F601B7BEE895A5
:10FCE000C0E0D1E062D089930C17E1F7F0E0CF16C5
:10FCF000F0EEDF0618F0F601B7BEE89568D007B65B
:10FD000000FCFDCFA601A0E0B1E02C9130E01196FF
:10FD10008C91119790E0982F8827822B932B129625
:10FD2000FA010C0187BEE89511244E5F5F4FF2E0A7
:10FD3000A030BF0751F7F601A7BEE89507B600FC53
:10FD4000FDCF97BEE89526C08437B1F42ED02DD0D4
:10FD5000F82E2BD03CD0F601EF2C8F010F5F1F4FF8
:10FD600084911BD0EA94F801C1F70894C11CD11CFE
:10FD7000FA94CF0CD11C0EC0853739F428D08EE10F
:10FD80000CD086E90AD08AE07ACF813511F488E078
:10FD900018D01DD080E101D063CF982F8091C00092
:10FDA00085FFFCCF9093C60008958091C00087FF27
:10FDB000FCCF8091C00084FD01C0A8958091C60051
:10FDC0000895E0E6F0E098E1908380830895EDDF08
:10FDD000803219F088E0F5DFFFCF84E1DECF1F939A
:10FDE000182FE3DF1150E9F7F2DF1F91089580E04B
:08FDF000E8DFEE27FF2709946C
:040000030000FC00FD
:00000001FF

Lefty

Yeah flak88, you need to fix the lines with comments in them:

mighty_opt.name=Mighty 1284p 16MHz using Optiboot >> Mighty 644p 16MHz using Optiboot

becomes:
mighty_opt.name=Mighty 644p 16MHz using Optiboot

mighty_opt.upload.maximum_size=130048 >> 63488?? with 2K bootloader
becomes
mighty_opt.upload.maximum_size=63488

mighty_opt.build.mcu=atmega1284p >> atmega644p
becomes
mighty_opt.build.mcu=atmega644p
or
mighty_opt.build.mcu=atmega644
depending on if you have a 'p chip or not

and point to the correct bootloader:
mighty_opt.bootloader.file=optiboot_atmega1284p.hex

becomes
bobuino644.bootloader.file=optiboot_atmega644p-4-5.hex

I saved Lefty's file as a .hex file for, download into the correct directory.

optiboot_atmega644p-4-5.hex (1.44 KB)

Ok Ive made the changes and now im getting when I try and upload the following error "avrdude : stk500_getsync(): not in sync:resp=0x49".Tried mighty_opt.build.mcu=atmega644 and mighty_opt.build.mcu=atmega644p made no difference.

Try with low_fuse=0xF7. Do you have the auto reset circuit working properly? (100nf capacitor from DTR to reset, a 10k pullup from reset to Vcc).

@pito yes I can confirm it does upload on 0023 arudino IDE so circuitry is fine but not any other version like the latest 1.0.3 for some reason.Ive tried pulling rst to gnd quickly then back to vcc via 10k resistor just before I click the upload button and still get error "avrdude : stk500_getsync(): not in sync:resp=0x49" .

flak88:
@pito yes I can confirm it does upload on 0023 arudino IDE so circuitry is fine but not any other version like the latest 1.0.3 for some reason.Ive tried pulling rst to gnd quickly then back to vcc via 10k resistor just before I click the upload button and still get error "avrdude : stk500_getsync(): not in sync:resp=0x49" .

So what bootloader do you have burned into your 644 chip and what board.txt entry did you end up using?

Lefty

Im using this board.txt

##############################################################

mighty_opt.name=Mighty 644p 16MHz using Optiboot 
mighty_opt.upload.protocol=arduino
mighty_opt.upload.maximum_size=63488
mighty_opt.upload.speed=115200
mighty_opt.bootloader.low_fuses=0xF7
mighty_opt.bootloader.high_fuses=0xde
mighty_opt.bootloader.extended_fuses=0xfd
mighty_opt.bootloader.path=optiboot
bobuino644.bootloader.file=optiboot_atmega644p-4-5.hex
mighty_opt.bootloader.unlock_bits=0x3F
mighty_opt.bootloader.lock_bits=0x0F
mighty_opt.build.mcu=atmega644
mighty_opt.build.f_cpu=16000000L
#mighty_opt.build.core=arduino:arduino
mighty_opt.build.core=standard
mighty_opt.build.variant=standard

Im not sure 100% which boot loader is on my 644 pretty sure its sanguino.

flak88:
Im using this board.txt

##############################################################

mighty_opt.name=Mighty 644p 16MHz using Optiboot
mighty_opt.upload.protocol=arduino
mighty_opt.upload.maximum_size=63488
mighty_opt.upload.speed=115200
mighty_opt.bootloader.low_fuses=0xF7
mighty_opt.bootloader.high_fuses=0xde
mighty_opt.bootloader.extended_fuses=0xfd
mighty_opt.bootloader.path=optiboot
bobuino644.bootloader.file=optiboot_atmega644p-4-5.hex
mighty_opt.bootloader.unlock_bits=0x3F
mighty_opt.bootloader.lock_bits=0x0F
mighty_opt.build.mcu=atmega644
mighty_opt.build.f_cpu=16000000L
#mighty_opt.build.core=arduino:arduino
mighty_opt.build.core=standard
mighty_opt.build.variant=standard




Im not sure 100% which boot loader is on my 644 pretty sure its sanguino.

Well the IDE is expecting that the bootloader is designed to talk at 115200 baud rate which the older standard sanguino bootloader didn't. So either burn the new 644 optiboot bootloader onto the chip or edit that boards.txt entry for the baud rate your existing bootloader on the chip is using, whatever that baud rate is. You also may have to edit the mighty_opt.upload.maximum_size=63488 value as the value is based on the what is left over after you install the bootloader and the opitboot is smaller then older standard bootloaders.

Lefty

Thanks anyway

Is it possible to burn a bootloader on a 644 by using a atmega 328 or does it need to be a programmer ?

flak88:
Thanks anyway

Is it possible to burn a bootloader on a 644 by using a atmega 328 or does it need to be a programmer ?

Well most any 328P based arduino board running the arduinoISP sketch can be used as a 'programmer' to burn bootloaders onto target chips.

Also need to know if you have a 644 or a 644P chip as that might run into problems because of different chip signature bytes. Not sure what problems that might become or how to over come it.

Lefty

Yes, use Nick Gammon's programmer sketch.

and

CrossRoads:
Yes, use Nick Gammon's programmer sketch.

http://www.gammon.com.au/forum/?id=11635
and
http://www.gammon.com.au/forum/?id=11638

Thanks.