PIC16F88 Delorme Tripmate GPS Logger with Time and Speed

I’ve updated my PIC16F88 Delorme Tripmate GPS Logger, so it now includes time and speed logging. Using the trip information recorded by the GPS logger, you now have even more variables to play with. For example, using time and velocity information, one can plot not only the speed, but also the acceleration of the car (dv/dt) for a trip:

Continue to the post for more information about the updated firmware, usage instructions, and limitations of this firmware.

This PIC16F88 Delorme Tripmate GPS Logger with Time and Speed firmware uses the exact same hardware and software of the PIC16F88 Delorme Tripmate GPS Logger, so please follow the instructions on the PIC16F88 Delorme Tripmate GPS Logger page for information about component selection and circuit construction. This firmware is intended solely as an update to allow for speed and time logging.

The firmware was rewritten to accommodate the variable logging changes, so the structure is quite different. Unfortunately I had to move most of the processing commands to functions outside of main() because of page size limitations. This clutters the code quite a bit, but I needed to do it to fit all of the code onto a PIC16F88. I’m planning on moving this firmware to a PIC18F series microcontroller at some point to take advantage of the larger program space and RAM. However, for the time being this current iteration will stand as my exercise monitor.

What are the functional changes in the firmware?

  1. The microcontroller now records Time, Latitude, Longitude, and Speed when valid data being received (as opposed to just Latitude and Longitude). Unfortunately, due to the program memory restrictions of the PIC16F88, I was unable to include date and/or Course Made Good (heading) recording. Please note that the date and heading are stored in RAM but are not written to the EEPROM.
  2. The read mode no longer outputs nice, Google-friendly Latitude and Longitude coordinates. Again, due to program memory restrictions, I removed all floating point math. Therefore, the Latitude and Longitude are now presented in the original NMEA HHMM.MMMM format. This requires some post processing, but it is very minimal. Please see the Excel file included with the example below.
  3. Any previously recorded data will return nonsense information. This is due to the new storage format.

Other than these functional changes, the firmware should be drop-in compatible.

Source Code
As with the original PIC16F88 Delorme Tripmate GPS Logger, the PIC16F88 must be initially programmed with the โ€˜tinybld16F88_i8MHz _19200.HEXโ€™ hex file to program the GPS logger firmware onto the PIC. If you have already programmed the bootloader onto the PIC then all you need is to load the newest firmware below.

UPDATE (February 27, 2007)
Terry pointed out the following issue with the source code:

Found one bug. In socal, the longitude is > 99, so the fprintf needs to be changed from:

void sendDataToSerial() {
fprintf(PC,”%06Lu,”, GPRMC.time);
fprintf(PC,”%04Lu.%04Lu,%C,”, GPRMC.latHandM, GPRMC.latFractM, GPRMC.latDir);
fprintf(PC,”%04Lu.%04Lu,%C,”, GPRMC.lonHandM, GPRMC.lonFractM, GPRMC.lonDir);
fprintf(PC,”%03Lu.%03Lurn”, GPRMC.speedH, GPRMC.speedL);
}

To:

void sendDataToSerial() {
fprintf(PC,”%06Lu,”, GPRMC.time);
fprintf(PC,”%04Lu.%04Lu,%C,”, GPRMC.latHandM, GPRMC.latFractM, GPRMC.latDir);
fprintf(PC,”%05Lu.%04Lu,%C,”, GPRMC.lonHandM, GPRMC.lonFractM, GPRMC.lonDir);
fprintf(PC,”%03Lu.%03Lurn”, GPRMC.speedH, GPRMC.speedL);
}

Example Output

  • Raw data output from PIC16F88 Delorme Tripmate GPS Logger: 2007-02-01.txt