Sunday, October 31, 2010

Processing NMEA strings with a microcontroller

This is only a sketch I've done some months ago. I've translated it into code and it does operate very well!!!

Here is an example of the software (written in C), based on the following flowchart, running on a PIC16F877A:

The purpose is to process NMEA strings from a GPS unit. Only the $GPRMC sentence is evaluated.

Download of flowchart is reserved to subcribers:


  1. First of all I wont to specify that I am very novice in Hi Tech environment.
    I will like to become an HiTech user and I need help.

    Now my problem:
    I wont to write a program which receive the data from a GPS in serial asynchronous format NOT by dedicated RX / TX pins because already used, but with any other port free.
    The communication should be at dbaud 38400.

    Can you indicate me the first steps to find an solution for my problem?

  2. You must use an emulated UART, but I don't have a library for this. Or you must consider to use a picmicro with two UARTs. The are no pic16 in dip format with two usarts. There is the PIC16F1947 or the PIC16F1527 that have two usarts but are only available in TQFP or QFN packages. If you want to use a dil package you must choose a pic18. There are 22 pic18, in dil format, that have 2 usarts (18F23K22, 18F26J13, 18F45K80, 18F46K80 etc etc)

  3. When some sites stop to promote "Learning electronics by points\make points publishing something also if is stolen by other sites", I may consider to publish part of source code. I've been working on this many months with no earnings.

  4. I understand. But can you give me only the part about the reception of strings by RS232?