Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:38 01 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Question re Jeff’s GPS Synchronised Clock

Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 06:36am 20 Jan 2016
Copy link to clipboard 
Print this post

I've built the GPS Synchronised Clock as per Silicon Chip's magazine in March 2009
Modified the clock module, i'm just waiting for one part to arrive

I have run into a problem though, the gps module I have defaults to 9600 baud, not 4800
Is there any way to change the code in the program to 9600 instead of 4800
alternatively I need to find a way to change the gps setting to 4800

I have 2 gps modules, one is the ultimate gps breakout board which works best, its more sensitive
The other is a NEO-6M module
both default to 9600

I have a pc and no arduino built at the moment, so any talking to the gps module will have to be through the pc

unless I can figure a way to change the code to work at 9600 obviously.

Any ideas or suggestions?
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 08:46am 20 Jan 2016
Copy link to clipboard 
Print this post

Hi
You can change the line below

open "COM1:4800" As #1 ' open the GPS serial interface

to
open "COM1:9600" As #1 ' open the GPS serial interface


Regards
Jman
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9033
Posted: 08:47am 20 Jan 2016
Copy link to clipboard 
Print this post

Assuming this is the same project as in EPE May2011 (they normally publish the same projects two years behind) then you can change the source as follows:


Change this line:

MOVLW h'33' ; now set SPBRG reg for 4800 baud async serial comms
mode


to:
MOVLW h'19' ; now set SPBRG reg for 9600 baud async serial comms
mode


With a bit of detective work you could upload the hex file from the chip into your programmer, find the relevant hex number 33 and patch it to 19 and then reprogram the chip. Alternatively recompile the source - you would need to download the relevant development environment from Microchip


Edited by matherp 2016-01-21
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 08:52am 20 Jan 2016
Copy link to clipboard 
Print this post

Thanks
I figured the easy way, use a terminal program and send the command $PMTK251,4800*14<CR><LF>
What had me totally confused for a long time was how I worked out the checksum, luckily found a calculator online :)
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 09:18am 20 Jan 2016
Copy link to clipboard 
Print this post

Found a problem
Although I changed the baud rate to 4800 and it works great, if I disconnect power from the gps module it resets back to the default 9600 baud
Seems the only hope is to somehow modify the baud rate of the program to match
which is highly unlikely
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024