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.

Reset on 18F4520

Status
Not open for further replies.
Hi E,
I don't recall why I have a long field, but I imagine that it was a casual thing.
I think the gaps are an accident from copying each NMEA sentence from my Excel converter file. It's difficult to convert GPS signals to NMEA sentences. Here's my way, attached.
I assume from your comments, that I should shorten the field,remove the gaps, and lower the buffer trap number?
E.

hi,
You could do that, but why are you using such a long ,BASEDEGREE.00 field in the string.?
E

Update:
Why are there Spaces in the message.??
 
hi C,
I would suggest you keep your test message lengths no longer than you would expect from the GPS module.
Remove the Spaces and if necessary shorten the BASEDEGREE.00 to say BASEDEG.00 , that's another 3 chars less.
E
 
hi C,
I would suggest you keep your test message lengths no longer than you would expect from the GPS module.
Remove the Spaces and if necessary shorten the BASEDEGREE.00 to say BASEDEG.00 , that's another 3 chars less.
E

Understood, thanks.
 
Understood, thanks.

hi,
Check using Oshonsoft Options/Ram Memory usage the amount of free RAM and Flash memory.
I have had to shrink some of my 18F4520 programs because of the Compiler complaining of insufficient RAM.
E
 
Hi Eric,
All simulation NMEA sentences shortened, and the program back to >80 <60 as original.
I don't see the ram option, I should probably update again?
E.
 

Attachments

  • SIM Options.jpg
    SIM Options.jpg
    192 KB · Views: 261
hi,
Refer images.
E
 

Attachments

  • A04.gif
    A04.gif
    12 KB · Views: 274
  • A05.gif
    A05.gif
    11.8 KB · Views: 265
hi C,
You must compile the program before doing the RAM check, else you will show zero usage, as per your image.:woot:
E

Which line in the program.???

EDIT:
This what I see for 18F4520 project with SD Card.
As you can see I have almost no RAM [GPR] free.
 

Attachments

  • A01.gif
    A01.gif
    11 KB · Views: 267
Last edited:
hi C,
You must compile the program before doing the RAM check, else you will show zero usage, as per your image.:woot:
E

Which line in the program.???

EDIT:
This what I see for 18F4520 project with SD Card.
As you can see I have almost no RAM [GPR] free.

Another try:)
C.
 

Attachments

  • RAM after compile.jpg
    RAM after compile.jpg
    80 KB · Views: 253
Also: Is the line shown in the program, being used?

hi,
That basecos is equivalent to latcos1, so its now redundant.

'extract from your listing
latrad1 = 50.662341 / 57.295779
lonrad1 = 1.591347 / 57.295779
latcos1 = Cos(50.662341).???? degrees !

''Note:
latcos1 = cos(50.662341/57.295779) ' REM Rads !! == 0.884224665 ==latrad1

E

You have lots of free RAM
 
Hi,
It's possible that I have found the 'reset problem'! It's possible that I had a line incorrectly positioned in the program. I've now moved it and the program appears to be ok now, so it looks as if the problem isn't to do with a reset problem.
More tests before finalising.
Thanks to all who helped.
C.
 
hi C.
That's good, what was the problem.
E
 
hi C.
That's good, what was the problem.
E
Hi E,
The line I mention above, is the basecos line which is in the program too early, using variables that hadn't arrived yet. Once moved it could do its proper calculation.
C
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top