Arduino Projects    |   Raspberry Pi  |     Electronic Circuits    |    AVR    |    PIC    |    8051    |    Electronic Projects   |   Free TI Design & Simulation Tools 

How to interface GPS with 8051 Microcontroller (AT89C51)


Developed By: 
Himanshu Choudhary
GPS has become an efficient tool in the field of scientific use, commerce, surveillance and tracking. This project presents a small application based on Global Positioning System. It depicts the use of GPS module/receiver to find latitude and longitude of its location. The data obtained from GPS receiver (GPGGA sentence) is processed by the microcontroller to extract its latitude and longitude values.

The GPS Module has been interfaced with
AT89C51 and the location values are displayed on a 16x2 LCD interface.
Interface GPS with 8051 Microcontroller (AT89C51)


The GPS module continuously transmits serial data (RS232 protocol) in the form of sentences according to NMEA standards. The latitude and longitude values of the location are contained in the GPGGA sentence (refer NMEA format). In this program, these values are extracted from the GPGGA sentence and are displayed on LCD.

The serial data is taken from the GPS module through MAX232 into the SBUF register of 8051 controller (refer serial interfacing with 8051). The serial data from the GPS receiver is taken by using the Serial Interrupt of the controller. This data consists of a sequence of NMEA sentences from which GPGGA sentence is identified and processed.

The extraction of location values is done as follows. The first six bytes of the data received are compared with the pre-stored ($GPGGA) string and if matched then only data is further accounted for; otherwise the process is repeated again. From the comma delimited GPGGA sentence, latitude and longitude positions are extracted by finding the respective comma positions and extracting the data. The latitude and longitude positions extracted are displayed on the LCD interfaced with AT89C51.

To obtain more details (other than latitude and longitude) from the GPS receiver, GPRMS sentence can be used. Refer next article.

The circuit connections are as follows:
Receiver1 (R1) of MAX232 has been used for the serial communication. The receiver pin of GPS module is connected to R1IN (pin13) of MAX232. R1OUT (pin 12) of MAX232 is connected to RxD (P3.0) of AT89C51.

Pins 1-3 of port P1 (P1.0, P1.1 & P1.2 respectively) of AT89C51 are connected to the control pins (RS, R/W& EN) of LCD. The data pins of LCD are connected to Port P2 of the controller. The latitude and longitude positions are displayed on the LCD. 


Circuit Diagram



This Code is only visible to Registered users. Please Login/Register


This Code is only visible to Registered users. Please Login/Register


MAX232 | IC MAX232
The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of microcontrollers with PC. The controller operates at TTL logic level (0-5V) whereas the serial communication in PC works...
AT89C51 Microcontroller, Atmel 89C51 Controller Image
AT89C51 Microcontroller

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (...

16 x 2 LCD | 16x2 Character LCD Module


LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments...

Free Circuit Design & Simulation Tool by TI

Free Powerful Circuit Design & Simulation Tool by Texas Instruments

TINA-TI is a powerful circuit design and simulation tool. TINA-TI is ideal for designing, testing, and troubleshooting a broad variety of basic and advanced circuits, including complex architectures, without any node or number of device limitations.

Download It Here


Tina TI

TINA is an easy-to-use, powerful circuit simulation tool based on a SPICE engine. TINA-TI is a fully functional version of TINA, loaded with a library of TI macromodels plus passive and active models.

TINA-TI's new version 9 has changes from Version 7.0 in the following areas:

  • Schematic Symbol Editor (useable with the Macro Wizard) is included, so you can create your own symbols for imported SPICE macromodels.
  • Macros do not have to be from TI - you can import anyone's SPICE model now!
  • Does not require active or non-linear components for analysis (so you can now run a circuit using just passives).
  • TINA-TI includes Initial Condition and Nodeset components
  • TINA-TI includes Linear and nonlinear controlled sources (VCVS, CCVS, VCCS, CCCS), and the Controlled Source Wizard.
  • TINA-TI now allows WAV files to be used as stimulus (signal sources). You can play calculated waveforms on PC's multimedia system, and export calculated waveforms as a *.wav file.
  • TINA-TI has Multi-core processor support; this along with other optimizations makes simulations run 2-20 times faster.
  • Schematic file import/export in XML format
  • Block Wizard included for making block diagrams
  • TINA-TI has more SPICE models and example circuits included.
  • Circuits developed in TINA-TI 9 will work with TINA Industrial version 9.
  • TINA-TI Version 7.0 is forward compatible with Version 9, and version 9 supports saving schematics in version 7.0 format.
  • Available in English, Traditional and Simplified Chinese, Japanese, and Russian versions.

Download The Tool Here Free

You are here