djahmednawaz
Newbie level 3
I am creating a Tracker which sends GPS Location to Server Through GSM after every 15seconds.
In which i am getting string from a GPS Module (Holux M-89) and sending this string through GSM Module (SIM300DZ).
I connected the GPS TX pin to RX of PIC18f452 and GSM RX to TX of IC18F452.
GPS Module work on baud rate of 4800 and GSM Module Work on baud rate of 9600.
1st i initialize the UART with 4800 and got string from GPS. then i initialize the UART with 9600 and send through GSM.
Untill this my Simulation in ISIS-Proteus Working fine...
but when go back for getting new string from GPS (Note: I reinitialize UART at 4800) it stuck there. at while(RCIF==0);
Following Code i am using for Initializing UART at 4800 for GPS
Following Code i am using for Initializing UART at 9600 For GSM
Any Idea how to solve this problem..
I need to send GPS data after every 15seconds Through GSM.
Note: I am using Hi-TECH Compiler and PIC18f452
In which i am getting string from a GPS Module (Holux M-89) and sending this string through GSM Module (SIM300DZ).
I connected the GPS TX pin to RX of PIC18f452 and GSM RX to TX of IC18F452.
GPS Module work on baud rate of 4800 and GSM Module Work on baud rate of 9600.
1st i initialize the UART with 4800 and got string from GPS. then i initialize the UART with 9600 and send through GSM.
Untill this my Simulation in ISIS-Proteus Working fine...
but when go back for getting new string from GPS (Note: I reinitialize UART at 4800) it stuck there. at while(RCIF==0);
Following Code i am using for Initializing UART at 4800 for GPS
Code:
void initGPS(void) {
TRISC6=0;
TRISC7=1;
PORTC=0x00;
TXSTA=0b10100000;
RCSTA=0b10010000;
SPBRG=(int)(20000000/(64.0*4800)-1);
}
Code:
void initGSM(void) {
TRISC6=0;
TRISC7=1;
TXSTA=0b10100000;
RCSTA=0b10010000;
SPBRG=(int)(20000000/(64.0*9600)-1);
}
I need to send GPS data after every 15seconds Through GSM.
Note: I am using Hi-TECH Compiler and PIC18f452