Module/Library to obtain GPS time on your projects

Engle

Well-known member
In a recent project I updated a previously shared .basinc module, so that now M2 chips can also obtain an accurate GPS time with it.

Previously, only supported X2 chips were supported because hserin was used with Scratchpad RAM. In the update it's now possible to use either serial, hserial with buffer and peeksfr, or hserial with Scratchpad. The module communicates to a NEO-M8N board at 9,600bps, so unless Scratchpad is used the M2 or X2 clock rate needs to be set to at least 16MHz.

I hope someone may have a use for it. You can either rename the attached file to have a .basinc extension, or download the master copy from GitHub here. The file itself contains inline documentation and looks quite long but it only consumes about 200 bytes of program space.
 

Attachments

Thanks John, glad to see some re-use. It integrated well with the RTC in my original project and powering up once a day for a few minutes was efficient. In my last project though I ditched the RTC and just gathered the GPS time every so often because I didn't need high accuracy and the interrupt. With this approach I found my program diverted on GPS gathering for about a second, which was noticeable. Hope all goes well.
 
Back
Top