2 months with the same problem GPS give rubbish with Arduino Uno.

sorry to disappoint you, the baud rate was ok... during investigation that's the reason I have not mention it

in fact when I connect to the hyper terminal it does not do through the arduino and the result is great

These Google translations aren't great - could you maybe get someone who speaks English to help you?

Your symptom looks like a baud rate mismatch.

How does the GPS determine what baud rate to use?

Your symptom looks like a baud rate mismatch

I am using the max232 with the GPS S1315R

Sounds more like the max232 is still in-circuit to me.

Maybe the OP will enlighten us.

see below the code I normally use to do get the information from the GPS.

The way you guys mention about the baud rate I feel like Serial.begin(9600); is not enough of a initialisation of a baud rate...?

what else should I do then if it is the case?

the code is a bit different that the first one.

void setup()
{
lcd.begin(16, 4);
pinMode(rxPin, INPUT);
Serial.begin(9600);
}

}

void loop()
{
if (Serial.available() > 0)
{
// read the incoming data:
incomingdata = Serial.read();

if (incomingdata)
{
j = 0;
dataRead[j] = incomingdata; // include each char read to the array

dataRead[j+1] = '\0';
Serial.print(dataRead[j]);
j++;
}
}
else
{
Serial.print("Not found \n");
delay(1000);
}

}

There is a small mistake of } on the last message I posted... pls disregard.

Well so far we do not have a link to the data sheet for the device, we do not have an adequate unambiguous description, photograph, or diagram of the interconnections, and we do not have a copy of all of the code. Otherwise we have everything we need to provide an intelligent response to his questions.

Don

will2is:
There is a small mistake of } on the last message I posted... pls disregard.

Why don't to fix it? There is a "modify"-button to edit previous posts.

Cheers,
Kari

You should connect the GPS to pins other than 0 and 1 - so connect them to pins 2 and 3 and use newSoftSerial to talk to the GPS. From a quick google search it looks like you should be using 9600 as the rate.

Also, the Serial function is so you can talk to the IDE via the debugger and you can't overlap it with the GPS. You need Serial to talk to the debugger and NewSoftSerial to talk to the GPS.

So you need two serial functions like so:

#include <NewSoftSerial.h>

NewSoftSerial nss(2,3);

void setup() 
{
  lcd.begin(16, 4);            
  pinMode(rxPin, INPUT);
  Serial.begin(9600);         // for the debugger
  nss.begin(9600);           // for the GPS on pins 2 and 3
}

I tracked down a copy of the SkyTraq S1315F (FLASH version of the S1315R ROM version)

It says 9600 baud.

thanks for you replies,

Daneel, I will try what you said and update you as soon as it is finished

Well, Daneel it still give rubbish. I order a new arduino... since I played a lot with this one I wander if I have not damaged it... or something.... I will check with the new one and give some updates...

Hello guys, as posted at the start I get rubbish from the GPS S1315R the I have. I try all the code that I could find online with the same result: rubbish.
I went through the datasheet again
http://docs-europe.electrocomponents.com/webdocs/0df9/0900766b80df94d1.pdf

and it says SERIAL INTERFACE 3.3V LVTTL LEVEL.
I am using the max232 that give TTL.

is there any possibility that the problem might come from a non matching device?

thank you

and it says SERIAL INTERFACE 3.3V LVTTL LEVEL.
I am using the max232 that give TTL.

That sounds like a mismatch right there. a max232 is designed to convert from RS-232 voltages (+/- 3 to 15vdc) to TTL digital. But what it also does is do a logic inversion on the data line. As your device is already outputting a 3.3vdc LVTTL level, that logic inversion (going through the max232) is flipping the serial data upside down. You should just wire the GPS ground to arduino ground and the 3.3v serial output pin to your arduino digital input and try and read the data, it should work unconverted (and unmolested).

Lefty

Lefty... you are really what I call ENGINEER...

in fact I the max232 inverted incoming data... so rubbish was outputed all the time no matter the code.

thank you ever so much and very a lot

in fact I the max232 inverted incoming data

Pointed out in reply #12.

EDIT: Also, I notice, pointed out in reply #2!

Imagine how much faster he might have solved this if he had responded to #15.

Don

It appears that you are looking at a data sheet for a different GPS module than the Skytraq S1315F. The S1315F does speak NMEA but it is best used in the Skytraq binary format. Which I am sure is what you are seeing.

You can get very accurate position fixes with the S1315F but you either need access to a nearby base station's data or you need two receivers, one stationary, one moving..and realtime calculation of your position using both is such a heavily CPU-intensive task that Arduinos can't do. However, lots of other CPUs can.

However, if you download Skytraq's GPSviewer software you should be able to easily switch it to NMEA and write the configuration to flash- then you will have a very nice GPS chip capable of 20 Hz updates. The serial port speed can vary from 4800 baud to 115200. Its configurable.

For how to use the binary data, see RTKLIB: An Open Source Program Package for GNSS Positioning

Friend will2is,

Did you solve the problem ?
Did you get the position's coordinates ?
I wanna use a gps S1315R with arduino. Could you give the way step by step?