EmbDev.net

Forum: µC & Digital Electronics spi with GPS NEO-5Q (u-blox)


von moi (Guest)


Rate this post
useful
not useful
Hello.
I would connect a gps to a PIC using SPI connection.
But i dont find in what do I have to send to the gps to receive te date.
When I send FF, I just receive random data who looks a bit like NMEA 
data.

So i think i just don't send the write data to my gps.
Someone could help me ?

von David M. (md2k7)


Rate this post
useful
not useful
NMEA does contain date + time information - why don't you just parse it 
out?

Otherwise, just see the protocol specification at 
http://www.u-blox.com/images/downloads/Product_Docs/u-blox5_Protocol_Specifications%28GPS.G5-X-07036%29.pdf

Yours,
David

von moi (Guest)


Rate this post
useful
not useful
The problem is that I don't know how to get NMEA data with SPI.
The gps is the slave so it doesnt send the data alone.

That's why i think the master must send the good message to the gps.

And i already read the doc, but I didn't find it :s

Thank you.

von David M. (md2k7)


Rate this post
useful
not useful
"By default, all ports are configured for UBX and
NMEA protocol so in most cases, it’s not necessary to change the port 
settings at all."

So just send 0xFF and read in data... (Altough I'm not sure that you 
will get NMEA and not UBX data)

If you need to configure NMEA only, see page 97 and following, 
especially field 'outProtoMask' in the document I've posted before.


"The baud rate clock provided by the master must not exceed 25kHz"

I'm not sure if this is a typo (not rather MHz?) or if they are really 
telling you to use 25 kHz max., but I would give it a try.

von moi (Guest)


Rate this post
useful
not useful
Okay!
In my doc (which is a bit different than yours (mine must be older)) 
there is : "The baud rate clock provided by the master must not exceed 
250kHz".

And my baudrate is 166KHz.

So the problem may be here.
I'll try to reduce the baudrate under 25KHz.

von moi (Guest)


Rate this post
useful
not useful
It works !
Thank you very much !!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.