PIC plus-5110 LCD-GPS-BMP280-HMC5983

Status
Not open for further replies.
hi C,

It works for me, note one point you were not clearing msg1 at the correct location.

Hserout "TIME=", strtim, " lat=", #sinlat, " lon=", #sinlong, " alt=", #sinalt, CrLf
msg1 = ""
'###########################################################################
msg1 = strtim
msg1 = "TIME " + msg1
Call wr_msg(0, 0, msg1)
'############################################################################

msg1 = "" '+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Goto get_neo
End
 

Attachments

  • A001.gif
    13.5 KB · Views: 270
Hi E,
Do you have a live GPS to inject the NMEA?

I get the same result as you with simulation and injecting NMEA using a Terminal, but not with a live GPS.

I tried logging the live GPS NMEA and ran it as a Terminal Macro, which also worked and showed updating time.

So it appears to be some difference between how the GPS and the Terminal transmits DATA.

C.
 
hi C,
I have programmed a PIC with your program [ added a ':' font to the font1.bas] it works OK with Termite and TeraTerm, but I do not have my NEO set up for live GPS data.
E
 
hi C,
I have programmed a PIC with your program [ added a ':' font to the font1.bas] it works OK with Termite and TeraTerm, but I do not have my NEO set up for live GPS data.
E
hi C,
I have programmed a PIC with your program [ added a ':' font to the font1.bas] it works OK with Termite and TeraTerm, but I do not have my NEO set up for live GPS data.
E
Hi E,
I'll look at them the best I can with an Oscilloscope to see if i can spot any differences.

Using the Terminal, try this text. This works ok, with the minimum of information.

C.
 

Attachments

  • NMEA GGA.txt
    705 bytes · Views: 259
Hi C,
I have finally found a NEO I bought about a year ago.
I have it outputting all the messages, do you have a block of code that I can use to select only the GPGGA string.
E
 
hi C,
This is one problem.
The Serial out looks OK.
Goto get_msg
If rxi < 60 Then 'invalid msg
msg1 = "" '''''''''''''''''''''''''''''''''''' ' the msg must be cleared if too short.
Goto get_neo
Endif


E
Will continue testing


EDIT:
Changing Time now showing OK on the LCD display.
 
hi C,
This basic displays Time/Lat/Long/Alt on the LCD and serial out, running from a NEO 6M module.
It is running at 32MHz, I have also modified the code slightly [ ''+++++++++++++ ]
Works fine , give it a try.
NOTE: set the SPI pins back to your settings

E
 

Attachments

  • eg_neoV3.bas
    6.8 KB · Views: 278
Last edited:
Hi C,
I have finally found a NEO I bought about a year ago.
I have it outputting all the messages, do you have a block of code that I can use to select only the GPGGA string.
E
View attachment 109943
Hi E,
Found the NEO, just where you left it
I don't think I have any code for separating GPGGA. I usually edit a page on the odd occasions I need to.
C.
 
hi C,
The NEO was still in its original wrapper, in a 'safe' place...

The neo3V.bas is able to accept all the data msg strings from the NEO without any problems and extract $GPGGA msg.
Give it a go and let me know if you want any changes.

E
BTW: I deleted the GPS clip of the NEO data, I don't want the whole Planet to know where I live.
E
 
Hi E,
I tried the eg_neoV3 , with changed SPI, but it didn't work, because I found it very difficult to proof read it without it turning into a bag of spaghetti. It will take me some time.

I tried [msg1 = ""] after [If rxi < 60 Then] but didn't work so:

In the mean time, I have changed
'If str1(5) = 0x47 Then 'G' str1 array ###### TEMP CHANGE #####################
If str1(6) = 0x43 Then 'C' str1 array
which now shows TIME and time updating.
and bearing in mind that as I will be using a barometer/ALT module, perhaps the more reliable $GPRMC sentence will be ok.

I'll slowly change each new section over, while verifying each time, till it all works.

I contacted UBLOX tech support and asked then if they could shed any light on the subject, but they couldn't understand the question

[Off to paint the bathroom which was plastered about 6 months ago]

EDIT: I'm not sure which version of 184520 you are using, but I wonder if using 18LF4520 has any bearing on the problem?

C.
 
Last edited:
hi C,
That program is running fine, not missing any data.
LCD and Serial out.
Its a 40pin DIL 18F4520.

Are you sure PIC pins are set for I/O as required.???

E

EDIT:
Do you have a clear image you could post.??? [ While the paint is drying.]
 
Last edited:
hi C,
Rewired my project board PIC's, SPI pins, Rst,Mode etc, to match your connections, it works fine.
E
 
hi C,
Rewired my project board PIC's, SPI pins, Rst,Mode etc, to match your connections, it works fine.
E
Hi E,
Could you post your latest program with SPI the same as mine please? I got mixed up swapping over. [Probably had painting the bathroom in my mind]

Bear in mind that using the RMC sentence is ok, does this prove the IN/OUTS are ok?

I tried the UBLOX forum, and reveicved this reply:

"Does the PIC use a software UART implementation?

Check the bit timing of the data, likely to be tightly packed. So very little slack time between bytes."

C.
 
Hi C,
Attached Cam_neoV3.bas [using your pin out]

We are using the PIC's hardware port.
E
 

Attachments

  • cam_neoV3.bas
    7.3 KB · Views: 272
  • cam_neoV3.hex
    30.9 KB · Views: 255
Hi C,
Attached Cam_neoV3.bas [using your pin out]

We are using the PIC's hardware port.
E
Hi E,
[One coat of paint in the bathroom]

Hardware port not UART, ok.

I compiled it and it works.

I compared your HEX file with mine and apart from the first 30 ish lines, the other 900 are completely different and mine is 200 lines longer?. Is this expected?

I noticed that as it searched for a signal, and the sentences got longer, as soon as the TIME filled up, it told the time, and the sentence was 40 digits and commas.

EDIT: What was the problem that caused it not to work?

Thanks.

C.
 
Last edited:
What was the problem that caused it not to work?
Hi C,
Ref post #261 & #266.

Are you saying when you compile the Basic program I posted, the hex file 200 lines longer than mine..???

E
BTW the UART is the hardware port.

Examples of a Software UART

DEFINE SEROUT_DELAYUS = 5000
SEROUT PORTC.6, 1200, "Hello world!", CrLf
DIM I AS BYTE loop:
SERIN PORTC.7, 9600, I
SEROUT PORTC.6, 9600, "Number: ", #I, CrLf
GOTO loop
 
Hi E,

Looking at #266. How does the program get to 'If rxi < 60' ? To me it looks as though the it would jump over it. [I'll look again tomorrow]

Here's the HEX I compiled: Both program the same result.

C.
 

Attachments

  • cam_neoV3.hex
    43 KB · Views: 257
Hi E,
Looking at #266. How does the program get to 'If rxi < 60' ? To me it looks as though the it would jump over it. [I'll look again tomorrow]
Here's the HEX I compiled: Both program the same result.
C.

hi C,
If rxi < 60' ? ,' action
If length less than 60 then
'its a corrupt msg so
sdstr="" ' clear the corrupt msg from the buffer
then got back to the start of NEO and restart looking for the '$'
goto get_neo

The reason for the Hex file size difference is the font1.bas.
In my version I have dropped the Big fonts and one or to others, so the overall file size is shorter.

What is the next stage in the project.?
E
 
Hi E,
I noticed that 'time' was updating on the 5110 when the lines on the terminal showed they were about 40 long, and when I looked at line 'If rxi < 60' the program appears to jump over it.

I'll shorten my font1 also and call it fontsml, if that's ok. Or you can post yours please.

Having being introduced to 'INCLUDES' by your with font1, I think it's a good idea to use them for different modules if you think it's a good idea. So 'GPS', perhaps 5110 etc then each module will hopefully be separated and be more manageable.

Perhaps a bit ambitious, but I hope to add a barometer module (BMP280) for ALT, a compass ( LSM303) and a radio (sx1278). I hope this interests you, as I expect it to take me decades if I'm on my own

[Bathroom last coat]

C.
 

Attachments

  • Less than 60.jpg
    104.3 KB · Views: 256
Hi,
I've had a go at making an INCLUDE also shortening the FONT file. Does this look ok?
C.
 

Attachments

  • 18LF4520 8MHz X4 5110 NEO8 SML 050118 1400 Include gps.txt
    5.7 KB · Views: 247
  • fontsml.txt
    3.9 KB · Views: 250
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…