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.

get command from GPS module..

Status
Not open for further replies.

miss85

Newbie level 2
Joined
Apr 8, 2008
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
hi,
i'm working on project using PIC microcotroller and GPS module (MTI-1). in my project, i need to send the data from GPS module to the modem. my problem is, i need only 1 protocol i.e GGA to be send to the modem. i've write the coding using C programming but still can't work. here i attached my coding. can anyone help me solve this problem...
unsigned short gps,protocol[5];
unsigned short in[76] = {'$','G','P','G','G','A'};
int i;
int find = 0;

void main()
{
Usart_Init(4800);

while(!find)
{
statement:
if (Usart_Data_Ready()) // If data is received
{
gps = Usart_Read(); // Read the received data
if(gps=='$')
{
for(i=1; i<6; i++)
{
if(Usart_Data_Ready())
gps = Usart_Read();
protocol = gps;
}//for

for (i=1; i<6; i++)
{
if (protocol==in) //comparing each data
{
if(Usart_Data_Ready())
find = 1;
//in = Usart_Read();
} else {
find = 0;
goto statement;
} //else
}
}
else { goto statement;} //for
} //if

for(i=6; i < 76; i++)
{
gps = Usart_Read();
in = gps;
}

for(i=0; i < 76; i++)
{
Usart_Write(in);
}
} //while
Delay_ms(1000);
}
 

Greetings,

First than all, we need the schematic, ie, how you interface microcontroller, the gps, and your modem to check if it is well done. Design failures are the main causes of this projects.

I hope the interfacing schematics......

Good Luck
 

Please try communicating your GPS module with hyperterminal as This is what I suggest everyone here. and everyone gets the solution by doing step by step debug as I suggest. First try out the GPS by connecting it to hyperterminal and see if you are getting all the parameters. If not then you need to send AT commands to GPS modem and then you will get all the data.
 

i also have a problem with GPS (GPS 18 - Garmin). First i could receive data from GPS by hyper terminal. But suddenly, it don't send anything.

@ckshivaram: u said that "need send AT commands to GPS". Can u show me what commands i must send?

Thanks!
 

Can u use this link and use the software to find out what is the problem. The software is UNAV. IT is used by all in the forum, to find out the problem and response of the module.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top