Electronic – Unable to receive GPS data from Quectel L80 GPS module

cgpspicuart

I have a Quectel L80 GPS module with PIC24fj128ga202. I am using UART2 to get GPS data from the module and I transfer the received data to hyperterminal, using UART1. Between PIC and PC I there is an RS3232 converter. Here I did not get response data from GPSmodule in hyperterminal.

My code:

void silicon(void)
{
    OSCCON = 0x0000;
    CLKDIV   =  0x0000;  
    OSCTUN = 0; 
    RPINR18bits.U1RXR   = 7;
    RPOR4bits.RP8R  =   3;
    RPINR19bits.U2RXR   = 14;
    RPOR6bits.RP13R  =   5;      
    ANSA = 0x0000;
    ANSB = 0x0000;
    PORTA = 0x0000;
    TRISA = 0x0000;
    PORTB = 0x0000;
    TRISB = 0xc000;
    U1MODE = 0x0000;
    U1STA = 0x0400;     
    U1BRG = 25;
    U1MODEbits.UARTEN = 1;
    U2STA = 0x0400;     
    U2BRG = 25;
    U2MODEbits.UARTEN = 1;
    PORTBbits.RB15=1;
    TMR1 = 0;
    while (TMR1 < DELAY)
    {

    }
    PORTBbits.RB15 =0;
    TMR1 = 0;
    while (TMR1 < DELAY)
    {

    }        
}

void uartsend(char in_c)
{
    while(U1STAbits.UTXBF != 0);
    U1TXREG = in_c;
}

char uartrec()
{
    char c;
    while(U1STAbits.URXDA == 0); 
    c = U1RXREG;
    return c;   
}
void uartsend2(char in_c)
{
    while(U2STAbits.UTXBF != 0);
    U2TXREG = in_c;
}

char uartrec2()
{
    char c;
    while(U2STAbits.URXDA == 0); 
    c = U2RXREG;
    return c;   
}

int main()
{
    int i,j;
    led = 1;
    silicon();
    while(1)
    {
        uartsend(uartrec2());
        led =!led;
        for(j=0;j<250;j++)
        {
            for(i=0;i<1275;i++);
        }
    }
    return 0;
}

Best Answer

When no antenna is connected externally then module it self falls back to internal antenna . As per your description , you are testing indoor which is not suitable environment for L80 . Please check this in open Sky condition .