Serial communication between 28x1 and parallax GPS module

Jazz

New Member
Please help!

I have a 28x1 chip and a Parallax GPS module. I want to connect serially to recieve information like heading and lat/long.
The GPS module has a 'smart mode' if its raw pin is left HIGH, which means I should be able to request specific information from the module.
As yet I have been unable to get any data from the module as I cannot work out how to specify the serial input/output pins on the portc (whenever I specify 7 it automatically selects the portb output pin.
What am I doing wrong? Should I use a 'let dirsc =' command to specify when I want to read out or in? Or do the commands serout and serin do that for me?
All I know is that the programmer doesn't understand c7 or C7, and will not select the port.

here is a sample of code that I have been working on:

init:

pause 2000

main:
let dirsc = %00010000
pause 300
serout 4,T4800,("!GPS",$01)
pause 300
let dirsc = %00000000
serin 4,T4800,b1,b2,b3

debug

goto main

If there is anyone that has used GPS successfully or can help with serial communication of this kind, I would be very appreciative. If not I'll have to go back to using a basic stamp...not something I want to do!
Thanks
Jazz
 

westaust55

Moderator
firstly, welcome to the PICAXE forum.


The PICAXE, at least for medium to larger chips has more IO than a B.S.2, so with a few exceptions (eg 08/08M) uses one group of pins for Inputs and a separate group of pins for the Outputs.

On the B.S.2, they can quickly change a pin between being an Input and being an output.

For the 28X1, the inputs use port C and the outputs use port B.

You will need to use some resistors or diode to connect the bi-directional pin of the GPS to both an Input and Output of the PICAXE.
 

eclectic

Moderator
After, after thought.
Instead of debug, use

Sertxd (#b1," ",#b2," ",#b3,cr,lf)

with the Serial terminal set to 9600

e
 

Jazz

New Member
Okay Thanks for your quick reply eclectic.
I've just tried with an 08M chip but unfortunately this chip doesn't work at the speed I need for the GPS (set at 4800) which can only be used on X parts.

Is there anything else I can do?

Thanks
Jazz
 

eclectic

Moderator
Okay Thanks for your quick reply eclectic.
I've just tried with an 08M chip but unfortunately this chip doesn't work at the speed I need for the GPS (set at 4800) which can only be used on X parts.

Is there anything else I can do?

Thanks
Jazz
Try my amended code above. post #2
Use an 08M at setfreq m8,
with a serout at n2400.
That should be the equivalent of n4800
 
Top