EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
You are here: Home / Topics / Interface a GPS module with 8051 extract the RMC data and display on 16×2 lcd

Interface a GPS module with 8051 extract the RMC data and display on 16×2 lcd

|

Microcontroller › 8051 › Interface a GPS module with 8051 extract the RMC data and display on 16×2 lcd

  • This topic has 1 reply, 2 voices, and was last updated 10 years, 4 months ago by praveen.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 19, 2012 at 4:26 pm #1563
    Tyrone
    Participant

    I’m trying to build up a sort of a GPS trecker using the SkyNave SKM53 gps module and interface it with the 89C51AC2 microcontroller. I’ve tried of all sort and thanks to this site I made up lots of improvement. Here I found a project that is similar to what I want to biuld, here’s the link: 

    http://www.engineersgarage.com/microcontroller/8051projects/extract-gps-receiver-details-8051-circuit

    I’ve done the same programming as I found here but I changed the output pins of the lcd instead of P2 I used P0 but the lcd dispaly nothing. Now I’m trying to just display the date so at least I can begin from somewhere I have diplayed “DATE” on the fist line and on the second line the result is something like this %%-%%-%% .  Below is the program of what I’ve done so far could someone please help me to extract the correct date please…

     

     

     
     
    #include<reg51.h>
     
    char info[70];
    char test[6]={“$GPRMC”};
    char comma_position[13];
    unsigned int check=0,i;
    unsigned char a;
     
    void lcd_data (unsigned int i);
    void lcd_cmd(unsigned int i);
    void delay(int j);
    void initialise_lcd();
    void lcd_date();
    void serial();
    void find_comma();
    void lcd_string();
     
    // SERIAL PORT SETTING
    void serial()
    {    
    TMOD=0x20;     //MODE=2    
    TH1=0xFD;       // 9600 BAUDRATE    
    SCON=0x50  ;   // SERIAL MODE 1 ,8- BIT DATA ,1 STOP BIT ,1 START BIT , RECEIVING ON    
    TR1=1;           //TIMER START
    }
     
    void receive_data()            interrupt 4 
    {    
    info[check++]=SBUF;       //Read SBUF
    if(check<7)    
    {        
    if(info[check-1]!=test[check-1])        
    check=0;    
    }    
    RI=0;
    }
     
    void main()
    {   
    serial();
       
    while(1)    
        {           
    find_comma();
    lcd_date();    
    }
    }
     
    // Send the begining commads – Always
    void initialise_lcd()  
    {
     
        lcd_cmd(0x38);   //init. LCD 2 lines,5×7 matrix
        delay(1000);
        lcd_cmd(0x0e); //display on, cursor on
        delay(1000);
        lcd_cmd(0x01); //clear lcd
        delay(1000);
        lcd_cmd(0xc0); //cursor
        delay(1000);
    }
     
    // Sending Command To LCD
    void lcd_cmd(unsigned int i)
    {   
    P0 = i  ;
        P2 =  0X04;   //rs = 0, rw = 0, e = 1
        P2 = 0X00;   //clear enable to make pulse
    }
     
    // Sending Data To LCD
    void lcd_data (unsigned int i)
    {   
    P0 = i ;
        P2 =  0X05; //rs = 1, rw = 0, e = 1
        P2 = 0X01; //clear enable to make pulse
    }
     
    void lcd_date()
    {    
    unsigned int c9=comma_position[8];
    unsigned char i =0;
    char write[] = “DATE”;
    initialise_lcd();
     
    lcd_cmd(0x80);
    for(i=0; i<4; i++)
    {
    delay(1000);
    lcd_data(write);
    }
    delay(1000);
    lcd_cmd(0xC0);
    delay(1000);    
    lcd_data(info[c9+1]);
    delay(1000);    
    lcd_data(info[c9+2]);
    delay(1000);    
    lcd_data(‘-‘);
    delay(1000);    
    lcd_data(info[c9+3]);
    delay(1000);    
    lcd_data(info[c9+4]);
    delay(1000);    
    lcd_data(‘-‘);
    delay(1000);    
    lcd_data(info[c9+5]);
    delay(1000);    
    lcd_data(info[c9+6]);    
    delay(1000);
     
    while(1);
    }
     
    //DELAY FUNCTION
    void delay(unsigned char i)
    {   
      unsigned int rr;
        for (rr = 0; rr < i; rr++);
    }
     
    void find_comma()
    {    
    unsigned int i,count=0;    
    for(i=0;i<70;i++)    
    {            
    if(info==’,’)        
    {            
    comma_position[count]=i;        
    } 
    }
    }
     
     
     
    Thanks 
    Tyrone

     

    March 22, 2012 at 7:12 pm #7319
    praveen
    Participant

    i  have problem in inerrupt 4……the value from gps is not  matching with the test array…..what should be done

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Can I use an SPDT 5 wire Relay in reverse? August 9, 2022
  • Basic questions about MOSFETS, Gate Drivers and Diodes August 9, 2022
  • LTSpice DC-AC August 9, 2022
  • Circuit Problem August 8, 2022
  • Google translate suggest "device sheet" or "apparatus sheet" but that cannot be ? August 8, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools