Compatibility arduino 0016 and 0022

Hello,

I wrote some code to control my GSM module. It works fine when I compile and upload it with Arduino 0016.

When I compile and upload exactly the same code in the arduino 0022 environment the AVR does send the right AT commands to my GSM module.(Checked with terminal program) But my module never responds. Any idea why?

Could somebody please help me with this problem?

best regards Jeroen

Here is my code:

int onModulePin = 5;        // the pin to switch on the module (without press on button)
int timesToSend = 1;        // Number of calls to make
int count = 0;

void switchModule()
{
  digitalWrite(onModulePin,HIGH);
  delay(2000);
  digitalWrite(onModulePin,LOW);
}

void setup()
{
  pinMode(onModulePin, OUTPUT);

  Serial.begin(115200);              // the GPRS baud rate
  delay(3000);
  switchModule();                    // switch the module ON
  delay(1000);
  
  Serial.println("AT");
  delay(2000);
  Serial.println("AT");
  delay(2000);
   
  Serial.print("AT+CPIN=");
  Serial.print(34,BYTE);
  Serial.print("9419");
  Serial.println(34,BYTE);
  delay(5000);
}
   
void loop()
{
  while (count < timesToSend)
  {
    delay(1500);
    Serial.println("ATD0612187964;");      // ********* is the number to call
    delay(12000);
    Serial.println("ATH");              // disconnect the call  
    delay(5000);
    count++;
  }
}

That sounds more like a hardware problem.

Between version 0016 and 0022 a LOT has happened, the last major thing was the changing of the core files to be register dependent, but I can't see anything in your code what looks like it should be incompatible with 0022. What's why I think it must be the hardware.

JanD

I loked at the release notes and saw that there were changes to the baud rate calculations in Arduino 17. I guess there is a slight chance that the GSM module is now seeing a different baud rate than before.

The download page (http://arduino.cc/en/Main/Software) has al the past versions so you could do a search for which version the problem starts in. That would narrow down the possible changes. Try 19 and If that doesn't work, try lower versions till it does. If it does work, try higher versions till it stops working. Let us know the highest version that still works.

Are you short of memory? We have a couple of instrument and control applications that compile and run fine on Duemilanove boards using 19.

The same code is useless with 21 and 22 in either Uno or Duemilanove boards. Instant memory problems. I spent quite some time thinking the code was broken, trying to fix the unfixable. Now we just use 19 to load up the code to run the experiment. it was easier to switch. It works as well as ever

Are you short of memory?

Huh? What was the question? I forgot it.