Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:16 25 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite 5.07.00 - Bug Reports

     Page 2 of 4    
Author Message
electricat

Regular Member

Joined: 30/11/2020
Location: Lithuania
Posts: 74
Posted: 06:06pm 01 Nov 2021
Copy link to clipboard 
Print this post

metherp I just flashed another pico board and it behaves like expected.

OK. Then I connected old one, made option run OFF >> then ON like you advised;
edited, saved , power OFF>> ON and yes, changes are there.

Still, as new user,  I don`t get it. And other new user might be confused.

User manual says "On the PicoMite the program is held in RAM. When you are editing the program, you are editing the image held in RAM ***** The firmware will also save a backup copy of the program to a special area of the flash memory and this will be automatically restored to RAM on startup following a reset or loss of power. The
result is that the user is unaware of the volatile nature of the RAM."

So that is "special area of flash memory" is 11 or whatever it will be named?

If yes, then I was mistaken by FLASH LIST  1-10 . I was sure 1 is main entry point and other like reserved slots.

Thank you metherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5714
Posted: 06:31pm 01 Nov 2021
Copy link to clipboard 
Print this post

You are better thinking of Flash 1 to Flash 10 as file stores. You can save one program per slot.

As an example, you can use OPTION AUTORUN 5 to automatically load and run the program stored in Flash 5 on power up, if you wish.

If AUTORUN is set to OFF then, on power up, the contents of the special flash area are loaded into RAM ready for editing.

The special flash area contents are updated when you press F1 (Save) or F2 (Run) in the editor IIRC. AFAIK you can't directly access that area - you won't find it as Flash 11. There would be no point in doing so.

FLASH LIST displays the status (and first line) of programs stored in Flash 1 to Flash 10. It's good to make that first line a short REM describing the program.
Edited 2021-11-02 04:34 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
electricat

Regular Member

Joined: 30/11/2020
Location: Lithuania
Posts: 74
Posted: 06:55pm 01 Nov 2021
Copy link to clipboard 
Print this post

Thank you Mixtel90 and friends in mind :)
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 01:27pm 04 Nov 2021
Copy link to clipboard 
Print this post

Looks like GPS(Valid) returns a 1, but the GPS(DATE) has not been set correctly
( This happens very sporadically )

I also noticed , while posting this, that the GPS(TIME) is not correct

My Test Code
' GPS Test Program
SetPin GP5,GP4,COM2

Open "COM2:9600" As GPS,-4
Print "Hold for valid data...."
Do While GPS(VALID)=0 :Pause 100:Loop
Print "GPS(DATE):" GPS(DATE)
Print "GPS(TIME):" GPS(TIME)
Print "GPS(VALID):" GPS(VALID)

Print
Print "Hold for fix data...."
Do While GPS(fix)=0 :Pause 100:Loop
Print "GPS(ALTITUDE):" GPS(ALTITUDE) "M" GPS(ALTITUDE)*3.2808399 "Ft"
Print "GPS(DOP):" GPS(DOP)
Print "GPS(FIX):" GPS(FIX)
Print "GPS(GEOID):" GPS(GEOID)
Print "GPS(LATITUDE):" GPS(LATITUDE)
Print "GPS(LONGITUDE):" GPS(LONGITUDE)
Print "GPS(SATELLITES):" GPS(SATELLITES)
Print "GPS(TRACK):" GPS(TRACK)

Date$=GPS(DATE)
Time$=GPS(TIME)

Print Day$(Date$) " " ToUSDate(Date$) " " Time$

Close GPS

Function ToUSDate(d$) As string
 toUSDate = Mid$(d$,4,2) + "/" + Mid$(d$,1,2) + "/" + Mid$(d$,7,4)
End Function


Output on a Good Run
> run
Hold for valid data....
GPS(DATE):04-11-2021
GPS(TIME):09:26:15
GPS(VALID): 1
....

Output on a Bad Run
> run
Hold for valid data....
GPS(DATE):00-00-2000
GPS(TIME):12:16:02
GPS(VALID): 1

Hold for fix data....
GPS(ALTITUDE): 349.2000122M 1145.669333Ft
GPS(DOP): 1.850000024
GPS(FIX): 2
GPS(GEOID):-xx.09999847 (note I put an 'xx' here  for the forum)
GPS(LATITUDE): xx.96518326 (note I put an 'xx' here  for the forum)
GPS(LONGITUDE):-xx.04301453 (note I put an 'xx' here  for the forum)
GPS(SATELLITES): 7
GPS(TRACK): 0
[23] Date$=GPS(DATE)
Error : Month is not valid


9 times out of 10 it works fine, I'm only showing a time it failed

I'm Running v5.07.00 on this Pico

Rob
Edited 2021-11-04 23:29 by robscott
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 01:37pm 04 Nov 2021
Copy link to clipboard 
Print this post

FWIW @lew247 and I have been having all sorts of fun and games with Gps(Valid) on the PicoMite:

- not always returning 1 even though the hardware says the GPS is "locked"
- returning 0 unexpectedly
- not returning 1 if queried in a tight loop (which is probably a "daft" thing to be doing anyway), e.g.:
Do : ? Gps(Valid) : Loop


It's been a bit of a moving target (no pun intended) and when I have a working GPS unit myself (@lew247 has been doing the testing until now) I'll try to provide something more concrete.

Best wishes,

Tom
Edited 2021-11-04 23:40 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8578
Posted: 02:00pm 04 Nov 2021
Copy link to clipboard 
Print this post

Rob

please assign a variable from GPS(Date) and then assign that to date$. Then you can do an on error and print the variable. That way I have something to look at

  Quote  - not always returning 1 even though the hardware says the GPS is "locked"
- returning 0 unexpectedly


This will happen if the parser finds a checksum error in the nmea string. Check wiring
Edited 2021-11-05 00:10 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 02:43pm 04 Nov 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  - not always returning 1 even though the hardware says the GPS is "locked"
- returning 0 unexpectedly


This will happen if the parser finds a checksum error in the nmea string. Check wiring


Thanks Peter,

Tom.
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 02:46pm 04 Nov 2021
Copy link to clipboard 
Print this post

  matherp said  Rob

please assign a variable from GPS(Date) and then assign that to date$. Then you can do an on error and print the variable. That way I have something to look at

  Quote  - not always returning 1 even though the hardware says the GPS is "locked"
- returning 0 unexpectedly


This will happen if the parser finds a checksum error in the nmea string. Check wiring


You must have missed the output above
GPS(DATE):00-00-2000

I have added this , as you asked
NDate$=GPS(DATE)
Print NDate$
On error ignore
Date$=NDate$
Print MM.Errno,MM.ErrMsg$

output
00-00-2000
16     Month is not valid


( I ran it 12 times to finally get the error)

is this what you were requesting ?

Rob
Edited 2021-11-05 00:47 by robscott
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 02:58pm 04 Nov 2021
Copy link to clipboard 
Print this post

  thwill said  ...
- returning 0 unexpectedly
- not returning 1 if queried in a tight loop (which is probably a "daft" thing to be doing anyway), e.g.:
Do : ? Gps(Valid) : Loop



Tom,
I could not get this to happen with my GPS (GT-U7 Compatible with NEO-6M)

once locked, I stay GPS(VALID)=1
(I ran your loop code, as is, for > 10 min)

Rob
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8578
Posted: 03:13pm 04 Nov 2021
Copy link to clipboard 
Print this post

Rob

I've just run your program umpteen times without error

Please try testing for GPS(VALID) immediately before the assignment to date$

if gps(valid) then date$=gps(date)
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3839
Posted: 03:49pm 04 Nov 2021
Copy link to clipboard 
Print this post

  robscott said  Tom,

I could not get this to happen with my GPS (GT-U7 Compatible with NEO-6M)
once locked, I stay GPS(VALID)=1
(I ran your loop code, as is, for > 10 min)

Rob


Much appreciated, thank you. I've been debugging this at arms-length, but hope to have my own working GPS witin a couple of days and then *maybe* I'll be able to get to the bottom of it.

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 04:08pm 04 Nov 2021
Copy link to clipboard 
Print this post

Maybe this helps, looks like the com buffer hasn't been cleared when the open happens
and if it's an $GPRMC as the 1st message, the date is not setup correctly

GPS Monitor ON

> run
Hold for valid data....
$GPRMC,155836.00,A,xx57.91263,N,xx402.57796,W,0.016,,041121,,,A*61
$GPVTG,,T,,M,0.016,N,0.029,K,A*2F
GPS(DATE):04-11-2021
GPS(TIME):11:58:36
GPS(VALID): 1

Hold for fix data....
$GPGGA,155836.00,xx57.91263,N,xx402.57796,W,1,07,1.24,343.7,M,-32.1,M,,*63
GPS(ALTITUDE): 343.7000122M 1127.624714Ft
GPS(DOP): 1.24000001
GPS(FIX): 1
GPS(GEOID):-xx.09999847
GPS(LATITUDE): xx.96520996
GPS(LONGITUDE):-xx.04296875
GPS(SATELLITES): 7
GPS(TRACK): 0
04-11-2021
0
Thursday 11/04/2021 11:58:36


again
(had to paste image, as it has special characters)



Rob
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8578
Posted: 05:46pm 04 Nov 2021
Copy link to clipboard 
Print this post

If that was the case then I should be able to replicate. Please put a pause 2000 after you first see valid and see if that changes anything

Please also try with your timezone offset not applied
Edited 2021-11-05 03:49 by matherp
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 12:58pm 05 Nov 2021
Copy link to clipboard 
Print this post

ok, my GPS issue is very very sporadic

Yesterday, after your note, I removed the UTC offset and added the delay
could not get it to fail (after 30 min)
so I removed that logic , to confirm it was a fix
and I COULD NOT GET MY ORIGINAL CODE TO FAIL  
tried for > 30 min, and gave up in frustration

so I tried my original code this AM, third try failed on the Date
great, so I took off the UTC offset, and tried again, failed after only 4 or 5 tries

ok, now we are getting somewhere
added in the PAUSE 2000
could no longer get it to fail  

then I removed the PAUSE 2000, added back the UTC offset
and now , my original code, will not fail   (been trying for awhile now)

I think I'll try again later to get it to fail

FYI, easy workaround, is to just try the DATE$=GPS(DATE) with an ON ERROR
and loop back to the valid check, as it will pickup the date on the next go around

Rob

Update:
My Original Code just failed with this
> run
Hold for valid data....
GPS(DATE):03-03-2052
GPS(TIME):13:04:22
GPS(VALID): 1

which IS a valid date, just not a correct one ....
(so my workaround would not catch this )
Edited 2021-11-05 23:14 by robscott
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8578
Posted: 02:54pm 05 Nov 2021
Copy link to clipboard 
Print this post

Rob

Thanks for all the testing. I found one route in the code that could yield the 00-00-2000 but AFAIK it could only happen with a RMC record with correct checksum but misconfigured latitude or longitude. Your latest 03-03-2052 I simply can't explain unless somehow your GPS is sending checksum correct but data incorrect messages.

If you have any energy left for this please try the attached and see what happens


PicoMite.zip
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 03:30pm 05 Nov 2021
Copy link to clipboard 
Print this post

I have now run > 1hr reading data from the GPS
looking only at the $GPRMC records, and confirming the Date field is a valid date (today's)

so I know it's not an issue with the data stream

Here is my Test Code to verify the stream data from the GPS
GPS Test Program 3.pdf

Update: Just saw your note, will continue testing with your .uf2

THANK YOU for making the Picomite happen

Rob
Edited 2021-11-06 01:33 by robscott
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 03:40pm 05 Nov 2021
Copy link to clipboard 
Print this post

Well it didn't take long to fail with the new .uf2
( Original .bas Code as posted )

Hold for valid data....
GPS(DATE):05-11-2021
GPS(TIME):11:40:21
GPS(VALID): 1

Hold for fix data....
GPS(ALTITUDE): 358.5M 1176.181104Ft
GPS(DOP): 0.9499999881
GPS(FIX): 1
GPS(GEOID):-32.09999847
GPS(LATITUDE): 35.96522522
GPS(LONGITUDE):-84.04299927
GPS(SATELLITES): 9
GPS(TRACK): 0
05-11-2021
0
Friday 11/05/2021 11:40:21
> run
Hold for valid data....
GPS(DATE):03-03-2047
GPS(TIME):11:40:24
GPS(VALID): 1

Hold for fix data....
GPS(ALTITUDE): 358.5M 1176.181104Ft
GPS(DOP): 0.9499999881
GPS(FIX): 1
GPS(GEOID):-32.09999847
GPS(LATITUDE): 35.96521378
GPS(LONGITUDE):-84.04299927
GPS(SATELLITES): 9
GPS(TRACK): 0
03-03-2047
0
Sunday 03/03/2047 11:40:24


Note the good run on top, followed by a failed run , now with a 2047 date

Rob
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 04:12pm 05 Nov 2021
Copy link to clipboard 
Print this post

Hey Peter
in GPS.c

You have this

 if (strstr(nmea, "$GPRMC") || strstr(nmea, "$GNRMC")) {
  // found RMC
   char *p = nmea;
   int i;
   // get time
   p = strchr(p, ',')+1;


Which could be like this
   
 if (strstr(nmea, "$GPRMC") || strstr(nmea, "$GNRMC")) {
  // found RMC
   char *p = strstr(nmea, "$GPRMC");
   if(!p) char *p = strstr(nmea, "$GNRMC");
   int i;
   // get time
   p = strchr(p, ',')+1;


otherwise, if nmea has garbage, it'll find the $GPRMC, but point to the garbage

Thoughts ?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8578
Posted: 04:38pm 05 Nov 2021
Copy link to clipboard 
Print this post

One more try


PicoMite.zip
 
robscott
Newbie

Joined: 20/10/2021
Location: United States
Posts: 22
Posted: 05:05pm 05 Nov 2021
Copy link to clipboard 
Print this post

ok,
so far so good....
( tried for awhile )
I'll continue throughout the day, and let you know if hit an issue

Thanks for the quick turnaround

Rob
 
     Page 2 of 4    
Print this page
© JAQ Software 2024