Sanguino W/ ATmega644A - Problem using Serial1

I'm having a problem accessing Serial1 on the ATmega644A and looking hopelessly for help :~

My current setup: Breadboard ATmega644A, Arduino 1.0.3 with Lauszus Sanguino Bootloader - https://github.com/Lauszus/sanguino

Working right now: Wiznet Wiz811MJ REV1.0 & SD Card reader with SN74HC125N level converter

Not working: Serial1 when compiling with Sanguino W/ ATmega644A.

Error messsage:

'Serial1' was not declared in this scope

Note: If for instance I compile this code with Sanguino W/ ATmega644P or Arduino Mega (ATmega1280) the compiling process goes successfull

void setup() {
  Serial.begin(9600);
  Serial.println("Hello World");
  
  Serial1.begin(9600);
  Serial1.println("Hello World");
}

void loop(){}

I would say to go ahead and call it a 644p.
There are known errors in avr-libc for 644 (SIGNATURE_2 is wrong, for one); I suspect that they made the 644a the same as the original 644, which only had one UART.
(and: bad move on Atmel’s part, to have the same signature for devices with that magnitude of HW difference! Grr.)

The definition for the 644A does specify a different bootloader so this may be needed.

Edit the Sanguino\boards.txt file: change these lines:

atmega644a.build.mcu=atmega644

...

atmega644a_8m.build.mcu=atmega644

To this:

atmega644a.build.mcu=atmega644p

...

atmega644a_8m.build.mcu=atmega644p

And then you can still select Sanguino W/ ATmega644A 16MHz or Sanguino W/ ATmega644A 8MHz from the menu.

First of all; Thank you for your prompt reply guys.

I went ahead and tried to change those lines on the "sanguino/boards.txt" file However, while doing so I wasn't able to find this line in particular:

atmega644a_8m.build.mcu=atmega644

Anyway, I did changed this line;

atmega644a.build.mcu=atmega644

for this one

atmega644a.build.mcu=atmega644p

The result: I got exited that now I am able to compile the code. Problem: However, once I try to upload the code I get the following messages:

Wrong microcontroller found.

avrdude: Expected signature for ATMEGA644P is 1E 96 0A Double check chip, or use -F to override this check.

Yes, forgot to mention another file to edit as a workaround.

Edit the file under arduino-1.0.4\hardware\tools\avr\etc\avrdude.conf. Look for this definition:

#------------------------------------------------------------
# ATmega644P
#------------------------------------------------------------

# similar to ATmega164p

part
    id               = "m644p";
    desc             = "ATMEGA644P";
    has_jtag         = yes;
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x96 0x0a;

change the signature to:

signature        = 0x1e 0x96 0x09;  #Temp fix for ATmega644A signature.

Of course remember to change it back if you ever plan to use an ATmega644P chip.

Thank you sir! Let me try that and report back to you.


...A couple of minutes later: It Works!!!. Finally after almost a week of frustration messing around with file settings and my breadboard setup, I can now receive AnalogInput data from a set of Xbee RF modules!!!

For Christ sake, Arduino should suport Sanguino, but since that's not happening any time soon. I wish I would have gotten an ATmega644P but sadly where I'm now availably and some times price is an issue.

Thank you so much for helping me out. Never thought people here would reply so promptly and lead me the right way. Thank you for your valuable and appreciated help in this regard. I wish I could at least buy you a cup of nice Java.

For Christ sake, Arduino should suport Sanguino, but since that's not happening any time soon. I wish I would have gotten an ATmega644P but sadly where I'm now availably and some times price is an issue.

I'm a 644P and 1284P fan myself, but to expect the arduino company to support chips and boards that they don't develop, build, or sell would be a nightmare of added support for them with little payback. Also there are maybe hundreds of different variations of AVR chips and boards made by 3rd party manufactures and to expect the arduino folks to pick and choice which they might 'officially support' or not in their IDE is an impossible task for them to take on.

I think it's enough that the arduino IDE developers have included 'software hooks' into the IDE making it a relatively easy task for 3rd party board manufactures to develop the files needed to support their version of boards into the arduino IDE.

Lefty

Arduino should suport Sanguino

Arduino doesn't even "support" the "ATmega328" (vs the 328p)...