GPS Module Interfacing

GPS Module (SKG13BL) Description

GPS Module

The SKG13BL is a complete GPS engine module that features super sensitivity, ultra low power and small form factor. The GPS signal is applied to the antenna input of module, and a complete serial data message with position, velocity and time information is presented at the serial interface with NMEA protocol or custom protocol.

It is based on the high performance features of the MediaTek  MT3337  single-chip  architecture,  Its –165dBm tracking sensitivity extends positioning coverage into place like urban canyons and dense foliage environment where the GPS was not possible before. The small form factor and low power consumption make the module easy to integrate into portable device like PNDs, mobile phones, cameras and vehicle navigation systems.

Features of GPS module

  • Ultra high sensitivity: -165dBm
  • Built-in 12 multi-tone active interference canceller
  • Low power consumption: Typical 22mA@3.3V
  • ±10ns high accuracy time pulse (1PPS)
  • Advanced Features: AlwaysLocate; AIC
  • UART interface: 4800/9600/38400/115200 bps
  • Small form factor: 15x13x2.2mm
  • RoHS compliant (Lead-free)


  • LBS (Location Based Service)
  • PND (Portable Navigation Device)
  • Vehicle navigation system
  • Mobile phone
  • Extremely fast TTFF at low signal level

Interfacing of GPS Module

GPS module interfacing with ARM7

Pin assignment with LPC 2148

Pin Assignments

UART DB-9 Connector

LPC2148 Processor Lines



UART1 (P2)

Algorithm for GPS module interfacing with LPC2148

1) Start

2) Initialise UART0 or UART1 serial interfface using following i nstruction

PINSEL0=0X0000 0005;//Enable P0.0-TxD0,P0.1-RxD0
U0LCR=0X83;  //8-BIT Character lenth,NO parity,1 stop bit
U0DLL=97; //Baud rate=9600@PCLK=15Mhz

3) Receive GPS Message of location and longitude through UART module using function UARTGetch()

4) Store single character in Variable GPSData


5) Copy each single received character in array lattitude and longitude

6) Send this array characters to LCD for displaying message

7) END

Video Tutorial (Program Explanation and KEIL Project)

Embedded C Code

/* Project Name:- GPS Module Interfacing with LPC2148 using UART module      */
/* Device:- LPC2148                          */
/* Compiler:- KeilUvision4                   */
/* Language:- Embedded C  */
/* Visit for more Details   */
#include <lpc214x.h>
#include "serial.h"
#include "lcd.h"

unsigned int j;

unsigned char Gpsdata;             // for incoming serial data
unsigned int finish =0;            // indicate end of message
unsigned int pos_cnt=0;            // position counter
unsigned int lat_cnt=0;            // latitude data counter
unsigned int log_cnt=0;            // longitude data counter
unsigned int flg    =0;            // GPS flag
unsigned int com_cnt=0;            // comma counter
unsigned char lat[20];             // latitude array
unsigned char lg[20];              // longitude array
unsigned int i=0;
unsigned int fg=0;;
void gps(void);

int main(void)


void gps()
     Gpsdata = Uart0GetCh();
        flg = 1;
      if( Gpsdata=='$' && pos_cnt == 0)   // finding GPRMC header
      if( Gpsdata=='G' && pos_cnt == 1)
      if( Gpsdata=='P' && pos_cnt == 2)
      if( Gpsdata=='R' && pos_cnt == 3)
      if( Gpsdata=='M' && pos_cnt == 4)
      if( Gpsdata=='C' && pos_cnt==5 )
      if(pos_cnt==6 &&  Gpsdata ==','){   // count commas in message

      if(com_cnt==3 && flg==1){
        lat[lat_cnt++] =  Gpsdata;         // latitude

      if(com_cnt==5 && flg==1){
         lg[log_cnt++] =  Gpsdata;         // Longitude

      if( Gpsdata == '*' && com_cnt >= 5 && flg == 1){
         lat[lat_cnt] ='\0';             // end of GPRMC message
        lg[log_cnt]  = '\0';
     com_cnt = 0;                      // end of GPRMC message
        lat_cnt = 0;
         log_cnt = 0;
         flg     = 0;
         finish  = 1;


   finish = 0;
   pos_cnt = 0;

  Note:- As I am sending these AT Commands using UART , So i need to add Program for Serial Communication Hence Add Serial.c and Serial.h file 
To download serial.c click on this link
       To download serial.h click on this link

Note:- As I want to display Lattitude and Longitude values on LCD I have to add LCD.c and LCD.h files in my keil Project    

To Download LCD.c click on dis link
      To Download LCD.h click on dis link

Download GPS Module Project: Click Here 


  • WikiNote Foundation

Last modified: Saturday, 18 April 2020, 4:23 PM