Go Down

Topic: Problem in Arduino DUE Serial port communication (Read 265 times) previous topic - next topic

Hariprasath

Hello All,

Recently I bought Arduino Due. I have connected by GPS device via serial. But while reading data  i am getting 0xFF from Due board (very frequently).


Already i posted here.
http://arduino.stackexchange.com/questions/18889/arduino-due-getting-0xff-garbage-from-serial?noredirect=1#comment35171_18889


This is sample data received  from Due:
5 2 E8 62 16 38 18 0 0 76 F 0 0 14 FC FF FF 0 0 0 0 0 0 0 0 9 0 99 1C

But i am sure that GPS device is working correctly.

Can anyone help on this?

Thanks,
Hari

PaulS

Quote
Can anyone help on this?
Without seeing your code? No.

Hariprasath

Herewith i have attached my code.

void setup()
{

    Serial.begin(115200);                                // serial to pc
    Serial2.begin (115200);                              // GPS
    Serial.println("init");

 
}
void loop()
{
while (Serial2.available () > 0)
    {
        processIncomingByte (Serial2.read (),timestamp,north,east,latitude,longitude, newdata);
    }
}

void processIncomingByte (const byte inByte,long& timestamp,double& north, double& east,double& latitude,double& longitude, int&newdata)
{

   Serial.println(inByte , HEX);

   //Processing message - code
}

MorganS

What does it look like if you print the characters?  It looks to me like the baud rate for the GPS is wrong. Are you sure it is 115200?
GoForSmoke: "What GShield? You never mentioned a shield."

dlloyd

What GPS module do you have and at what voltage level is it powered?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy