1. 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.
    Dismiss Notice

Reset on 18F4520

Discussion in 'Oshonsoft' started by camerart, Aug 15, 2016.

  1. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    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.

     
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    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
     
  3. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    Understood, thanks.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE

    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
     
  6. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    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.
     

    Attached Files:

  7. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    Refer images.
    E
     

    Attached Files:

    • A04.gif
      A04.gif
      File size:
      12 KB
      Views:
      55
    • A05.gif
      A05.gif
      File size:
      11.8 KB
      Views:
      57
  8. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    Hi Eric,
    Found it!
    Here's my usage:
    Does this mean that it is ok?

    Also: Is the line shown in the program, being used?
    C
     

    Attached Files:

    • RAM.jpg
      RAM.jpg
      File size:
      193.9 KB
      Views:
      72
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    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.
     

    Attached Files:

    • A01.gif
      A01.gif
      File size:
      11 KB
      Views:
      63
    Last edited: Aug 22, 2016
  10. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    Another try:)
    C.
     

    Attached Files:

  11. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    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
     
  12. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    Hi Eric,
    I've moved the last answer to the Tracker thread.
    C.
     
  13. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    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.
     
  14. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi C.
    That's good, what was the problem.
    E
     
  15. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,311
    Likes:
    11
    Location:
    Dorset UK.
    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: Aug 25, 2016
  16. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    That's a good catch...:happy:
     

Share This Page