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.

PIC-GPS error is high(Serial interface)

Status
Not open for further replies.

Naumanpak

Member level 2
Joined
Nov 19, 2009
Messages
51
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Pakistan
Activity points
1,635
Experts,

I am receiving serial data from a GPS module that is NMEA streams. Then displaying on LCD.

Streams are received but the error rate is significantly high, almost 2-3 dummy values per line..

I have done this on 8051 with no errors but struggling with PIC.

Here is my code, please suggest.

Code:
void main()
     {
      unsigned int i=0,j=0;
      TRISB = 0;
      TRISC.RC7=1;
      Lcd_Init(&PORTB);         
      Lcd_Cmd(Lcd_CLEAR);       
      Lcd_Cmd(Lcd_CURSOR_OFF);
      [b]SPBRG=0x26;[/b]

      TXSTA.SYNC=0;
      RCSTA.SPEN=1;
      PIE1.RCIE=0;
      RCSTA.RX9=0;
      RCSTA.CREN=1;
      RCSTA.RX9=0;

      
      while (1)
            {
                          while(!PIR1.RCIF){;}
                          ch=RCREG;
                          PIR1.RCIF=0;
                          Lcd_Chr_Cp(ch);
            }
            
      }



thanks!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top