Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 26th March 2008, 06:28 PM   (permalink)
Default Reading NMEA 0183 GPS data into a PIC

Hi all, this is my first post.

I have a small PIC project that is to read the NMEA 0183 strings from a GPS from the serial port and then, extract some values from it and then, process it and then, turn On/Off a relay on the pcb.

Wich PIC is required ?
I'll use C on MPLAB.

Someone has any hints on how to read the ASCII data from the serial port ?

Many thanks!
Sync is offline  
Old 26th March 2008, 06:40 PM   (permalink)
Default

Any PIC could do it, NMEA is only 4800baud. A PIC with a USART would make the programming simpler. The 16F628A or 18F1320 would both be good choices IMO.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 27th March 2008, 12:29 AM   (permalink)
Default

It would be easier to use a PIC with enough memory for the whole of the GPS sentence. That way, you can have a simple program to collect the data from the EUSART one character at a time, and store it in memory.

Then you can test the program that looks at the data using MPLAB.

I would use an 18F series PIC.
Diver300 is offline  
Old 27th March 2008, 02:10 AM   (permalink)
Default

Quote:
Originally Posted by Diver300
It would be easier to use a PIC with enough memory for the whole of the GPS sentence. That way, you can have a simple program to collect the data from the EUSART one character at a time, and store it in memory.

Then you can test the program that looks at the data using MPLAB.

I would use an 18F series PIC.
The data that i need to collect is only from the "GPRMC" line.
The first one start at 15 for 8 char lenght, the second one start at 26 for 9 char lenght and the third one start at 38 for 3 char lenght. Non stop collect. That is all.

From that data collected, i want first to look at the third one and use it to activate a pin 5 volts somewhere on the pcb.

I think this is an easy project but i've never done anything yet on a micro processor. :-(
I'll need some help and hints to begin the project.

Thanks!
Sync is offline  
Old 27th March 2008, 02:29 AM   (permalink)
Default

What have you programmed previously?

Mike.
Pommie is online now  
Old 27th March 2008, 02:36 AM   (permalink)
Default

Quote:
Originally Posted by Pommie
What have you programmed previously?

Mike.
Mostly on Linux, C shell, C++ :-).
Sync is offline  
Old 27th March 2008, 03:08 AM   (permalink)
Default

I would suggest that you install MPLAB and the C18 compiler and have a play with some of the C18 code posted here (Search C18).

To get the string into memory will be something like,
Code:
char chr;
ram char message[64];
ram char *pointer;

pointer=&message[0];
while(chr=GetRS232()!=10){
	*pointer++=chr;
}
The tricky bit with Pics is getting your head round two types of pointers, ram and rom. They are not interchangeable.

The initialisation and reading of the RS232 data is covered in various threads here.

Hope that gets you started.

Mike.
Pommie is online now  
Old 28th March 2008, 04:45 AM   (permalink)
Default

I don't know if i can do this here but since i really need this fast, i am willing to Paypal money to someone who is interested to do enough code that let me finish or fine tune it after.
Anyone ? PM me.
Thanks!
Sync is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
An error in pic16f84a, why? Zener_Diode Micro Controllers 6 11th April 2004 03:55 AM
Reading data from ADC output belinda_sg Micro Controllers 3 19th February 2004 06:51 AM
8051 microcontroller reading data from serial port godatguitar Micro Controllers 11 17th February 2004 09:04 PM
pc keyboard interfacing problem econsyst Micro Controllers 0 8th November 2003 09:28 PM
USB data aqusition discofunk General Electronics Chat 2 29th July 2003 12:01 PM



All times are GMT. The time now is 05:24 AM.


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

eXTReMe Tracker