Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using Ublox NEO-8 with SPI (Oshonsoft)

Status
Not open for further replies.

camerart

Well-Known Member
Hi,
I'm trying to get NEO_M8N GPS modules to work using SPI.
I've have been trying for quite a long time, with help from the Ublox forum, but so far can't get results.

Has anyone succeded, please let me know.
Camerart
 
I've not communicated with any GPS modules using SPI, but I have done various bits and pieces with SPI, and I've needed to use an oscilloscope each time. I've found it difficult to work out what is going wrong without a 'scope.

Even using a microcontroller with a dedicated SPI module, there are many options that need to be correct and you need something to tell you where it is going wrong.
 
I would check your signal (voltage) levels. The GPS is a 3.3V device (typically 3.0V), and depending in what PIC you are using, it may be using 5V levels which can possibly damage the GPS module. Always use a level converter if using a 5V PIC to a 3.3V device.
Even if the GPS device is still ok, "low" level on a 5V signal may be interpreted as a high signal by a device running at 3.0V. Too much chance that there is inconsistent signal levels.
 
I've not communicated with any GPS modules using SPI, but I have done various bits and pieces with SPI, and I've needed to use an oscilloscope each time. I've found it difficult to work out what is going wrong without a 'scope.

Even using a microcontroller with a dedicated SPI module, there are many options that need to be correct and you need something to tell you where it is going wrong.
Hi D,
I have other peripherals connected to the PIC that are controlled quite happily with SPI, but the NEO-8 is the only one that I can't get to work.
Thanks.
C
 
I would check your signal (voltage) levels. The GPS is a 3.3V device (typically 3.0V), and depending in what PIC you are using, it may be using 5V levels which can possibly damage the GPS module. Always use a level converter if using a 5V PIC to a 3.3V device.
Even if the GPS device is still ok, "low" level on a 5V signal may be interpreted as a high signal by a device running at 3.0V. Too much chance that there is inconsistent signal levels.
Hi S,
All of the voltages are 3.3V, so not over voltaged.
Thanks.
C
 
It would probably help if you could share what you are sending to the other SPI devices, and what you are trying to send to the NEO-8.
Hi D,
I have a very long program, and decided to make a test program, with only the NEO-8 on, for simplicity.
Here is the program I'm working on, but I'm not so good at programming, so it may not make sense.
C
 
In the datasheet it said that it supports SPI and RS232... The D_SEL pin has to be 0 for SPI..
In the datasheet it said that it supports SPI and RS232... The D_SEL pin has to be 0 for SPI..
You didn't upload it correctly.. Google drive says no..
Hi I,
I deleted it a few minutes ago, and uploaded a later one, perhaps it will open now. (Note it's in progress)

I have read that the NEO-8 supports SPI, and I've been trying since March, but so far I haven't got it to work, and I haven't heard from anyone who has. I've spent a lot of time on the Ublox site too.
I'm sure it will work, but there are so many combinations of programming etc, and as you know, one comma out of place spoils it.
Cheers, C
 
The SPI interface is normally very generic.. Most issues are usually initializing the device, then you just need to know the internal SPI registers.

I use a MEMS sensor, but as Proteus has no MEMS for simulation I use a memory chip and fill the registers manually.. The SPI is transparent and works exactly the same way..

I found some code for Arduino, but they used it as an RS232 connection.
 
Only the file name is visible to other users, not the file content.

You need to change the sharing or visibility settings.
Hi R,
I was having trouble posting on AAC, but here I can simply post it:
(Programming still in progress)
C
 

Attachments

  • 18f46K20 32mhz XTL PCB8_4 LEN 031022 1000.bas
    7.6 KB · Views: 156
The SPI interface is normally very generic.. Most issues are usually initializing the device, then you just need to know the internal SPI registers.

I use a MEMS sensor, but as Proteus has no MEMS for simulation I use a memory chip and fill the registers manually.. The SPI is transparent and works exactly the same way..

I found some code for Arduino, but they used it as an RS232 connection.
Hi I,
I use the same mthod for the other SPI peripherals, here a result, but no MISO
C
 

Attachments

  • D_SEL LOW  SPI.jpg
    D_SEL LOW SPI.jpg
    225.6 KB · Views: 153
Looking at your code... Your SPI commands are a bit suspect.

I read the datasheet, It looks like the SPI isn't really the best option for this device.. I think running from RS232 would be better... To use SPI you would need to set up interrupts and read incoming messages as they appear.. Or you would need to poll the ext IO coming from the unit..

This chip was designed around 232 that's for sure..
 
Looking at your code... Your SPI commands are a bit suspect.

I read the datasheet, It looks like the SPI isn't really the best option for this device.. I think running from RS232 would be better... To use SPI you would need to set up interrupts and read incoming messages as they appear.. Or you would need to poll the ext IO coming from the unit..

This chip was designed around 232 that's for sure..
Hi I,
I've just been for a walk to clear my head, and it may have worked, if you look at the image, it shows that I send 0x00s when I'm sure I should send 0xFFs. I'll check, and change the CODE, and let you know what happens.

I used to use the UART, but it clashes with another RX so I added a switch between them. If I can get SPI to work, it will be better.
C
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top