The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
Thread Tools Display Modes
Old 08-14-2005, 12:58 PM   #1
lez
FLAC
lez's CarPC Specs
 
lez's Avatar
 
Join Date: Jan 2004
Location: UK
Vehicle: XM 2.1 TD
Posts: 1,281
My Photos: (0)
Pic basic - 4800 baud?

I need 4800 baud in picbasic to try to monitor the 4800 baud gps signal from my gps mouse.

Tried the obvious serin porta.0,4800 style command but not happy it is.



Also, (was going to work this out later but if anyone has this answer!) If I wait for the start of gps data (GPRMC) header ie

$GPRMC,092204.999,A,4250.5589,S,14718.5084,E,0.00, 89.68,211200,,*25

I cant store it all as pic's have no string variables?

I wanted to read this on 1 pin, then store it, change it to SMS 7 bit superscrewed and send it to the phone as a send sms.

(which reminds me, does any phone support simple txt msg sendingwithout using 7 bit nibble swapped padded data?)


Think I can see it costing lots of money for the programming fluid (40%proof) for this one.
lez is offline   Reply With Quote
Sponsored Links
Old 08-16-2005, 09:15 AM   #2
Low Bitrate
Enak's CarPC Specs
 
Enak's Avatar
 
Join Date: May 2004
Location: Hertfordshire, UK
Vehicle: Range Rover
Posts: 65
My Photos: (0)
You'll have to break the data into chunks and store those
Enak is offline   Reply With Quote
Old 08-20-2005, 06:22 AM   #3
lez
FLAC
lez's CarPC Specs
 
lez's Avatar
 
Join Date: Jan 2004
Location: UK
Vehicle: XM 2.1 TD
Posts: 1,281
My Photos: (0)
But if I serin() and get the first chunk, I cant process it as I need all the other chunks.

I have not tried yet but I presume if I just read/store it that I wont be able to store it without missing the next chunk......

I suppose that depends on the size of the chunks, and how fast I can run the pic etc.
lez is offline   Reply With Quote
Old 08-20-2005, 06:36 PM   #4
Low Bitrate
Enak's CarPC Specs
 
Enak's Avatar
 
Join Date: May 2004
Location: Hertfordshire, UK
Vehicle: Range Rover
Posts: 65
My Photos: (0)
To process serial commands you really need an interupt based buffer routine.
Enak is offline   Reply With Quote
Old 08-21-2005, 01:43 AM   #5
Raw Wave
 
Join Date: May 2003
Posts: 2,021
My Photos: (0)
Setup the UART to interrupt on every char received.

On the ISR, read the received char, if its a "$" then you know you got the start of a header comming up. Else keep looking for it until it finds one.

Once you got a "$", this is when you start looking for a string "GPRMC". You can store this string on a retlw table.

From there on compare the next received char to the first char of the string which is a "G". If it fails then reset and look for a "$" again.

If it passed looking for a "G" then increment the retlw table index so it points to "P".

The expected char to be received is now "P"...

Keep looping until you got the GPRMC checked, once its passed you can now store what ever is comming up right up to the LFCR characters.

Store it using indirect adr, using FSR and INDF.
Chris31 is offline   Reply With Quote
Old 08-21-2005, 01:51 AM   #6
Raw Wave
 
Join Date: May 2003
Posts: 2,021
My Photos: (0)
Quote: Originally Posted by lez
I suppose that depends on the size of the chunks, and how fast I can run the pic etc.

PIC is fast enough for 4800bps, unless your code is so bloated.



Quote: Originally Posted by Enak
To process serial commands you really need an interupt based buffer routine.

I agree, its the best thing to do. I dont know how well BASIC handles a PIC interrupts...by the sound of it hes using a SW UART.

Last edited by Chris31 : 08-21-2005 at 01:58 AM.
Chris31 is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
GPS vehicle tracking, any advise ? paulfromholland GPS 53 07-01-2005 03:42 AM
OBD2 PIC code. racemier Engine Management, OBD-II, Engine Diagnostics, etc. 3 02-06-2005 12:10 PM
Visual Basic Question???? chuckctv Software & Software Development 9 12-28-2004 11:25 AM
Basic Stamps??? adjones Power Supplies 14 08-23-2004 11:28 PM
Using a PIC with Zehnder's LCDplugin - First Time Programing. Machs_FueL Software & Software Development 1 06-16-2002 03:12 AM


All times are GMT -5. The time now is 09:32 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics