Atmega (any chip) Device Signature issues and stk500_getsync()(resolutions)

My name is Yoshua Nava. I am from Caracas, Venezuela. I am part of a group of 4 people from Andres Bello Catholic University who are working on the designing and construction of a line follower robot based on the Sanguino plataform for CCSBots2013 robotics competition.
Today I only registered to say thank you, man. We were really confused because the ATmega644 chip wasn't being programmed by our Arduino, and as soon as we read your post, all our problems dissapeared. Awesome work.

I would like to explain how we programmed the ATmega644 with our Arduino UNO R3, so we can help any other person that has doubts on it. This are the steps we followed:

  1. Burn the ArduinoISP example that comes integrated with the Arduino IDE on your Arduino UNO R3.

  2. Wire the Arduino UNO to the ATmega644 as it is exposed in this page: Burning the Sanguino Bootloader using Arduino as ISP - RepRap

  3. Install the Arduino IDE v1.0.4.

  4. Download the official Sanguino package Sanguino-0101r1.zip from Google Code Archive - Long-term storage for Google Code Project Hosting. , unzip its content (sanguino folder) and copy it in the <> folder inside Arduino 1.0.4 main folder.

  5. Create an empty file called "ATmegaBOOT_168_atmega644.hex" in Arduino 1.0.4/hardware/sanguino/bootloader/atmega. Copy the content of this GitHub file https://github.com/Lauszus/Sanguino/blob/master/bootloaders/atmega/ATmegaBOOT_168_atmega644.hex into the new file we created.

  6. Open the file boards.txt inside Arduino 1.0.4/hardware/sanguino, and add the following lines:

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

atmega644.name=Sanguino W/ ATmega644

atmega644.upload.protocol=stk500
atmega644.upload.maximum_size=63488
atmega644.upload.speed=19200

atmega644.bootloader.low_fuses=0xFF
atmega644.bootloader.high_fuses=0x9A
atmega644.bootloader.extended_fuses=0xFF
atmega644.bootloader.path=atmega
atmega644.bootloader.file=ATmegaBOOT_168_atmega644.hex
#atmega644.bootloader.file=ATmegaBOOT_644P.hex
atmega644.bootloader.unlock_bits=0x3F
atmega644.bootloader.lock_bits=0x0F

atmega644.build.mcu=atmega644p
atmega644.build.f_cpu=16000000L
atmega644.build.core=arduino
atmega644.build.variant=standard

  1. Open the file programmers.txt inside Arduino 1.0.4/hardware/sanguino, erase all the lines starting with "arduinoisp", and add the following lines instead:

arduinoisp.name=Arduino as ISP / Sanguino
arduinoisp.communication=serial
arduinoisp.protocol=stk500v1
arduinoisp.speed=19200

  1. Open the file Arduino.h inside Arduino 1.0.4/hardware/sanguino/cores/arduino, and replace line 49 with the following:

#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560) || defined(AVR_ATmega1284P) || defined(AVR_ATmega644P) || defined(AVR_ATmega644)

  1. Start the Arduino IDE (restart it, if you had it already open), select Tools->Boards->Sanguino W/ ATmega644. Then, select Tools->Programmer-> Arduino as ISP / Sanguino. Finally, select Burn Bootloader, and wait untill the process finishes (Do not disconnect a single thing)

(We hope this may be useful. If anyone has any doubts, we would be glad to help. We don't know much, but we would try to make an effort to help. Contact us by a private message.)