Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

how to interface gps skm53 with pic 18f4685

Status
Not open for further replies.

skizoo

Newbie level 3
Newbie level 3
Joined
Feb 28, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,303
how can interface gps module skm53 with pic 18f4685
 

First connect the GPS module in hyperterminal through DB9 if it is working then go ahead with microcontroller


coneect groun and vcc to the gps reciever. check whether your GPS reciever gives TTL output or not. if it gives then connect the TX of GPS reciever to the RX of your microcntroller.
 

i do not understood good can you explain it in detail & by photo
 

Skm53 have logic outputs, so you can connect this module direct to PIC pins:

skm53 pins

RXD(6) to PIC18F4685 RX pin
TXD(5) to PIC18F4685 TX pin
RST(4) to any PIC18F4685 free IO pin
NC(3) not connected
GND(2) ground
VCC(1) power supply
 

thank you very much
but i have another question
how can programming gps
 

This GPS module use NMEA GPS protocol. You can find on internet some examples (search for NMEA GPS library)
 
  • Like
Reactions: skizoo

    skizoo

    Points: 2
    Helpful Answer Positive Rating
for checking in hyper terminal u don't need to program GPS just connect the Tx pin of your GPS module and V cc, ground to the above mentioned DB 9 connector to your PC and view in Hyper terminal
You will received data.. It will repeat for every 30 sec
So disconnect after a minute or so.
Then check what are you getting

$GPGSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75
$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39

$GPGGA Global positioning system fixed data
$GPGLL Geographic position - latitude / longitude
$GPGSA GNSS DOP and active satellites
$GPGSV GNSS satellites in view
$GPRMC Recommended minimum specific GNSS data
$GPVTG Course over ground and ground speed

So read the manual for NMEA Protocol

Consider any for Eg if you consider $GPGGA and its value...
it will give you position and time
you can display it through Programming on LCD
 
  • Like
Reactions: skizoo

    skizoo

    Points: 2
    Helpful Answer Positive Rating
the gps output is not ttl it is lvttl 2.85v and i think it cannot be directly connected to pic so how to convert it first ??
 

the gps output is not ttl it is lvttl 2.85v and i think it cannot be directly connected to pic so how to convert it first ??
Use transistor circuit
Schematic-GPS-Receiver.jpg
 
i used the circuit you put but i didn't get an out put on the lcd ,am using skm53 gps module and 16f877a pic with 8000 mhz crystal
the output of the gps is 2.35v and after it go through your circuit it become 4.95v at the RC7 of the pic but the pic can't read it i don't know why and this is the code i use...

PHP:
unsigned char long_data[12];
unsigned char lat_data[12];

unsigned char data;
int i=0;
void main()
{

         lcd_init(&portb);
         lcd_cmd(lcd_clear);
         lcd_cmd(lcd_cursor_off);
         usart_init(9600);
         trisd=0b00000001;
 trisb=0;
 portb=0;
 portd=0;
 lcd_out(1,5,"G.P.S");
 delay_ms(1000);
 lcd_out(2,5,"porgram");
 delay_ms(1000);
 while(portd.f0==0);
 while(1);
 {
   if(usart_data_ready()==1)
     {
     data=usart_read();
     if(data=='$')
       {
     data=usart_read();
     if(data=='G')
       {
        data=usart_read();
     if(data=='P')
       {
     data=usart_read();
     if(data=='G')
       {
     data=usart_read();
     if(data=='G')
       {
     data=usart_read();
     if(data=='A')
       {
     data=usart_read();
     if(data==',')
       {
       data=usart_read();
       while(data!=',');

       data=usart_read();
       for(i=0;data!='N';i++)

      { data=usart_read();
       lat_data[i]=data;
      } }
       data=usart_read();
     if(data==',')
       {
       data=usart_read();
       while(data!=',');

       data=usart_read();
       for(i=0;data!='E';i++)

      { data=usart_read();
       long_data[i]=data;
       }

       }
        i=0;
       lcd_cmd(lcd_clear);
       lcd_cmd(lcd_first_row);
       while(i<11);
       {
       lcd_chr_cp(lat_data[i]);
       i++;
       }
       i=0;
       lcd_cmd(lcd_second_row);
       while(i<11);
       {
       lcd_chr_cp(long_data[i]);
       i++;
       }
       i=0;
       }
       }
       }
       }
       }
       }
       }
       }
       }
[/PHP]
 

thnx for the example i will try to write a code like that one,
my code depend on asking if the RX receive $ then ask if it G the P , G ,G , A and store the next characters that will be received into two arrays -as you say- a longitude and latitude then display on lcd
thnx again.
 

    V

    Points: 2
    Helpful Answer Positive Rating
hi mr (electo sniper)
my problem same your problem...did you resolve it...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top