Reading and writing NMEA with PICs is a big part of what I do for a living so I can't give away my code, but I can give you some advice. Key on the entire sentance header, not just the "C". Just because you looked at what was coming out of the GPS and did not see another one does not mean that one won't pop up somewhere else later. Then count the commas after that before getting to the field you want. The length of each field is not defined by the NMEA standard so the number of characters until what you are looking for can and will change as the other data before it changes and will also be different with different brands of GPS. Certainly the time field will change in number of characters as the time changes. For a lot of fields such as speed there is nothing in the standard that defines the decimal point and how many decimal places are provided after it. 20 knots can be 20, 20.0, 20.00, 020.0, etc. What I do is save all the characters until it gets to the next comma then I have a routine that checks for a decimal point if there is one and puts the numbers in their correct places. If this is something you need accurate or if you just want a programming challenge read all the way to the checksum and make sure it is correct. Brian Kraut Engineering Alternatives, Inc. www.engalt.com -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of anthonysakr Sent: Friday, May 18, 2007 10:27 AM To: piclist@mit.edu Subject: [PIC] NMEA + PIC(update) this is what i could come up with by myself, i don't know if it's right but please send any help you could think of. my gps sends the following message every 2sec $GPRMC,141832,A,3352.401,N,03531.500,E,005.1.277.7.310301,003.3,E*79 (with different numbers each time of course) $GPRMB,A,............V*71 ... i'm interested in only these lines, to be more specific i just want to save the time, long, lat and speed, now from what i could understand the string is devided into the following: $GPRMC,"time"(6bytes),A,"long"(8bytes),N,"lat"(9bytes),E,005.1.2....... $GPRMB,A,......"speed"(6bytes)V*71 what i'm thinking of doing is the check for the C character (ASCII) wich comes in GPRMC and is only present there in all the gps string wich signals the start of the frame then read 86 bytes after the C character (from the first , till the 1 in 71) save them then sort them in some sort of table or buffer where i take only the bytes of the time, long, lat and speed before transmitting them to the ram(24LC64) via the I2C bus. if someone is intrested or has such a program please reply because i've been stuck on this part for quite some time, i've given it a try but i'm still learning to program pic as i go so i'm 90% sure my program is wrong :s but i'll be posting some of it soon. thanks. Anthony -- View this message in context: http://www.nabble.com/NMEA-%2B-PIC-tf3773331.html#a10683335 Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist