Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GSM and GPS integration for PIC16F877A

Not open for further replies.


Newbie level 4
Jan 12, 2009
Reaction score
Trophy points
Activity points
Hi there,
I am doing my project in vehicle tracking, which uses gps and gsm. I am using pic16f877a(MPLab HItech C compiler). I have completed the codings for both gsm and gps seperately. I need to integrate these things to vehicle tracking. But the pic16f877a has one UART port. Hence suggest me whether i have to use relays to switch between gps, gsm or some other way?
Thanks in advance.Please find the attachments of gps and gsm codings...


  • GSM_msg_send and receive_final.rar
    152.8 KB · Views: 127
  • PIC UART Code.rar
    217.7 KB · Views: 125

I will suggest you a simple method which I have implemented. Since you need only to receive data form gps modem connect rx and ground to gps.
If you don't want to get any response form gsm you can connect tx pin and ground to gsm.
I guess you are getting value from gps and sending it through sms.
The only disadvantage is that you cannot read the message from gsm and cannot get the response form gsm.
You can do this by Connecting GPS Trans pin to Controller Receive, and GSM Receive Pin to controller Transmit pin.

But in this you will not check the returns from the GSM Modem.
So my suggestion is to use a Digital Multiplexer i had used two mux one for Transmit Line and One for Receive line to interface three UART Devices, of which one is GSM/GPRS Modem, One is GPS and one is 232 Based Wind Sensor.
You you can easily do this,
Just keep the multiplexer on GPS and when you need send the sms change the mux to GSM and then back to GPS

you could also choose controller with two uart interface ,8051 from dallas has two uart,

Not open for further replies.

Part and Inventory Search

Welcome to