hi C,
This is a demo Sim version of the program.
It takes an incoming GPS message and saves into an Array.
The array is then parsed into the main values as Named Strings also converted to Named Single Numeric values for Maths operations.
So to display a message on the 5110:-
call wr_msg( x0,y0, name of the string) '
eg: call wr_msg( 0,0, strlat) ' or if you prefer
msg1 =strlat
call wr_msg( 0,0, msg1)
The delay has been finding code that will work in Oshonsoft using String and Single combinations.
hi C,
I see that you are using the 18F4520 with the internal 8MHz clock.??
If so, you could easily enable the internal * 4 PLL and run the PIC at 32MHz, this would give you more time to do complex maths routines.
hi C,
I see that you are using the 18F4520 with the internal 8MHz clock.??
If so, you could easily enable the internal * 4 PLL and run the PIC at 32MHz, this would give you more time to do complex maths routines.
Hi E,
I'll to set the *4PLL first and if I can I'll let you know.
My PCB has provision for a XTL. I think the fastest allowed is 20mHz. Would it be better to use a 16mHz being a division of 32, OR simply use the INT OSC?
C.
hi,
Using the Internal Osc at 8MHz with the PLL enabled would give 32MHz operation for zero cost and reduce the PCB tracks.
Use the Oshonsoft Config and select INTOSC as shown in this image.
OSCCON = %01110010 'internal 8Mhz clock OSCTUNE.PLLEN = 1 '*4 PLL enabled so Fosc == 32MHZ
E.
BTW I see that you are getting very close to using all your GPR space.!!!
This Basic cammy3.bas is a cleaned up version, note the GPR usage.
hi,
Using the Internal Osc at 8MHz with the PLL enabled would give 32MHz operation for zero cost and reduce the PCB tracks.
Use the Oshonsoft Config and select INTOSC as shown in this image.
OSCCON = %01110010 'internal 8Mhz clock OSCTUNE.PLLEN = 1 '*4 PLL enabled so Fosc == 32MHZ
E.
BTW I see that you are getting very close to using all your GPR space.!!!
This Basic cammy3.bas is a cleaned up version, note the GPR usage.
hi,
The 'te:st:st' is the Time taken from the GPS string eg: 123456 , formatted would be 12:34:56 .
In your Test Message, replace the word 'test' with a Time value HHMMSS .
GPR are the PICs General Purpose Ram locations.
When you DIM a parameter as a String, the Program allocates that String as Bytes in GPR's, so they are not available for use by the rest of the Program.
The 18F4520 has only 1536 Bytes of GPR space,
In your original Program you have only 61 Bytes left.!
If the next section of Code you write within that Program uses more than 61 Bytes for DIM's etc... the Program will not compile.
Hi,
Don't get 12V mixed up with 5V! Just 'popped' my GPS It's probably the regulator, so I may be able to fix it.
At one point I had "LAT" and the LAT STRING showing on the 5110. I can see the NMEA going into RX and out of the TX on the 18LF4520, with TERATERM (putty) So we're pretty close.
It's possible that even though the GPS looks like it working ok, it could be because it's inside and cloudy.
Here is a photo (Qualiteee) of the 5110 showing TIME and the time updationg ok. [No seconds!]
Here is the program:
I changed the GPS to an NEO-6 This isn't as sensitive as the 8, and I found that because it is in poor conditions, the NMEA sentences aren't being gleaned reliably, so I found one that always seems to show the TIME, so the 'verify' letter is 'C instead of G.
The program at #249 used NMEA sentence $GPRMC, because I was unable to get $GPGGA to work. I tried many combinations of letters for the selection. Also I temporarily tried removing the 4x 8mHz selection, and erase PIC memory before programming.
Here are two jpgs from the Teraterm (Putty) readout 1/ Just before the strtim shows after TIME, and 2/ Once the strtim shows after TIME on the 5110. From this I can't see why only RMC works and not GGA?? [It works in SIM]
Hi E,
I have two files of NMEA information, one has the ??????.00, and the other only has ??????,
As shown on the live Teraterm readings from the GPS, there is ??????.11 which changes to .00 within a second. The two live jpgs show just before the 5110 shows the updating time, and the second shows at the time udating time shows on the 5110, when using RMC only. To me they both look very similar, regarding TIME
I'm not sure what the [.00] are for except split second timing perhaps.
Hi E,
Ive tried lots of letter combinations in the:
'If str1(4) = 0x52 Then 'R'
If str1(5) = 0x47 Then 'G'
If str1(6) = 0x41 Then 'A' LOOP.
Any 1 letter or combinations of letters in the RMC sentence works ok. Any combination in the GGA sentence doen't work. It appears that it isn't recognising certain letters.
As shown in the JPGs as soon as the GPS 'sees' the time in RMC it prints it.
If I try If str1(6) = 0x41 Then 'A' then 'A' only is shown after the "TIME" In other combinations, I get different odd digits, but nothing in GGA.
I've had some programming tips regarding long programs by a mate. He says he uses modules for each section of a program. I've seen this with Ardiuinos, but never quite understood it. Since you added an INCLUDE for font1, would it be a good idea to have each of the sensors etc, as INCLUDES also? i,e, GPS,,,,,Barometer,,,Compass etc.