View previous topic :: View next topic |
Author |
Message |
vert02
Joined: 23 Jan 2009 Posts: 8 Location: Kuala Lumpur, Malaysia
|
Parallax GPS help |
Posted: Fri May 08, 2009 5:00 am |
|
|
Hi guys...
i really need help on this one...
i just received my parallax gps receiver module
and i do not know how to either use it or program it..
i want to use it to track my robot and to navigate it..
anyone can share their experience? |
|
|
John Morley
Joined: 09 Aug 2004 Posts: 97
|
|
|
Guest
|
|
Posted: Mon May 11, 2009 7:49 pm |
|
|
well thanks for the heads-up
but my real problem is this: parallax gps are mostly use with other micro controllers...not the PIC16F877A.
anybody else with help? |
|
|
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
|
Posted: Mon May 11, 2009 10:06 pm |
|
|
The communication is with the UART, look at any of the CCS UART examples. The UART is very easy to use with CCS C, and anyway you should only need the receive side. You only have to hook up 1 pin. The Parallax user manual shows the NMEA 'sentences' that it will send you automatically. Parse them as you receive for the data you wish.
Enable the uart interrupt and do the parsing in there, so the processor
has time to do other things as well. 4800 baud is very slow so you have
lots of time.
Code: |
#use rs232( BAUD=4800,PARITY=N,BITS=8,ERRORS,STOP=1,UART1 )
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);
|
Code: | #INT_RDA // UART receive char
void uart_isr() {
char a;
if(kbhit()) {
a=getc();
/* do stuff here
}
|
|
|
|
vert02
Joined: 23 Jan 2009 Posts: 8 Location: Kuala Lumpur, Malaysia
|
|
Posted: Tue May 12, 2009 8:37 am |
|
|
oh ok~
But if I already use that uart pin for my zigbee...pin c6 and c7. Can I use other pin as well for my gps? |
|
|
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
|
Posted: Tue May 12, 2009 10:24 am |
|
|
You can pick another pin but then you will need to use software UART which is going to consume much more CPU resources. |
|
|
vert02
Joined: 23 Jan 2009 Posts: 8 Location: Kuala Lumpur, Malaysia
|
|
Posted: Sun May 24, 2009 4:10 am |
|
|
Can you guys help me find out the C program for this gps receiver just to get lat and longitude only?
Thanks |
|
|
|