Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 3rd November 2004, 05:05 PM   (permalink)
Default RCM3400 interfacing with M12+ Oncore GPS receiver

Hi!i donno whether i'm suppose to ask question through here.but i really wish you guys can help me as i'm new to the dynamic C and the Rabbit microprocessor. i have one GPS receiver (M12+ Oncore GPS Receiver) and one RCM3400 dev kit with me. i'm trying to program the RCM3400 to pull the NMEA-0183 data from the GPS receiver. i'm facing a big problem for the interfacing between both this hardware. i've tried the serial port example of the dynamic C but when come to the NMEA-0183 data, as we know it consist of char and integer, so i dono how to save the data as. what i mean is how should i declare it as?as a string?as a character?as a integer?and another problem is where should i save the data to,i mean where should i locate them to?using array?please help.thanks in advance.

below is the program that i write using the Dynamic C. my main purpose is trying to send out the command to the receiver which is in the format of "$PMOTG,GGA,0001*01", then get the NMEA0183 respond from GPS receiver through the serial ports and then process the data.

#class auto
#define CINBUFSIZE 255
#define COUTBUFSIZE 255

#ifndef _232BAUD
#define _232BAUD 4800
#endif
const char nIn2;

main()
{
//auto int nIn2;
//xdata c { "$PMOTG,GGA,0001*01" };

brdInit(); //initialize board for this demo
serCopen(_232BAUD);
serCwrFlush();
serCrdFlush();

while (1)
{
//serCputc (c[0]); //Send lowercase byte
while ((nIn2=serCgetc()) == -1); // Wait for echo
printf ("serial C received %s\n",nIn2);

}
}
__________________
Regards,
Joneo
joneo is offline  
Old 3rd November 2004, 05:38 PM   (permalink)
Default

Quote:
as we know it consist of char and integer
For those of us who don't have the NMEA-0183 spec. in front of us right now, or are too lazy to search for it, what exactly does the data you're hoping to decode look like? Show me a simple byte-by-byte example.
JohnBrown is offline  
Old 3rd November 2004, 06:12 PM   (permalink)
Default

NMEA-0183 have lot of message respond format. for your information to use the M12+ Oncore receiver, i need to send the command "$PMOTG,GGA,0001*01" so that i can always receive the NMEA-0183 message of $GPGGA. and the respond will be in the format of $GPGGA,123519,4807.038,N,01131.324,E,1,08,0.9,545. 4,M,46.9,M, , *42. so my problem is what should i declare all the command send out and the responded NMEA data?thanks for your reply
__________________
Regards,
Joneo
joneo is offline  
Old 3rd November 2004, 07:41 PM   (permalink)
Default

It looks like a string to me. I suggest that you store it as a string, then lookup atoi or sscanf in your favourite C book.
JohnBrown is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 04:59 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker