EmbDev.net

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


Author: moi (Guest)
Posted on:

Rate this post
0 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 ?

Author: David Madl (md2k7)
Posted on:

Rate this post
0 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_Doc...

Yours,
David

Author: moi (Guest)
Posted on:

Rate this post
0 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.

Author: David Madl (md2k7)
Posted on:

Rate this post
0 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.

Author: moi (Guest)
Posted on:

Rate this post
0 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.

Author: moi (Guest)
Posted on:

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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.