PDA

View Full Version : PBP and Lassen SQ GPS



Ron Marcus
- 15th February 2005, 15:38
Has anyone worked with the Lassen SQ GPS module? I have a design task of interfacing one with an on screen display for remote video transmission. The SQ normally puts out a TSIP (squirrel code) string for interface to it's application software. It has the provision to be switched to NMEA format and supposedly store this to on board flash memory usint the PC interface.
The problem is that when power is removed, it reverts to TSIP. I have been through it with Trimble, but they can't come up with a reason it does this, or a fix. I feel that what must be done at power up, is to initialize the module and put it into NMEA with the interfacing PIC controller.
Anyone had similar problems? Should I go the extra mile and format it at every power up, or find another module?

Any help appreciated,
Ron

claxon
- 15th February 2005, 19:01
HI Ron,

used to have same problem, but after connecting the 3.6V battery backup (not compulsory) and using "tsip chat" (DOS proggy u can get from trimble site) all went fine.

Beware that the "SQ Monitor" win-proggy does not always save registers.

regards

Ron Marcus
- 15th February 2005, 19:30
I used the DOS utility and the starter kit with the same results. All works fine until power is removed. I got two units with the kit and both are the same.
Luckily I have a map that says,"You are here." or I'd really be in trouble !<grin>

claxon
- 16th February 2005, 12:00
well, I use tsip104
connect everything and when the tsip104 starts type "?"
you will see a menu with lotsa commands

what I do is that:

- first press SHIFT & "U" (that is port configure function)
select operation SET
the set baudrate, data bits, parity, stop bits
now set the protocol in to TSIP and
protocol out to NMEA
set receiver serial port

- second press "q" (that is NMEA OUTPUT CONTROL)
select operation set
select time interval
select whatever sentences you need (you will be surprised but initially all of them are set to off)

this way works for me even after powering off.

do u have a battery conected for backup ?

Ron Marcus
- 16th February 2005, 19:43
I can't have a battery backup in this design.The entire board, including the OSD circuitry is only one inch square.
It needs to either be in embedded flash, or the module must be formatted every time there is a power up sequence. I have talked to the Trimble engineer, and he sent me the hex code to initialize the module through my PIC. I will try this tonight, and share the code if there is any interest.

Thanks,
Ron

claxon
- 16th February 2005, 21:27
pretty much interested on my behalf here
waiting for ur test and info

also if u have a log of any nmea sentence received after a fix from lassen sq I would like to take a look if possible.

regards

Ron Marcus
- 17th February 2005, 16:33
OK, here it is...
serout2 gps_out,speed,[$03,$10,$7A,$00,$01, $00,$00,$00,$03,$10,$03]
pause 1000
serout2 gps_out,speed,[$03,$10,$BC,$FF,$07,$06,$03, $01,$00,$00,$02,$04,00,$10,$03]
pause 2000

Each serout command and data are on the same line.
speed is 9600 baud true. You must wait at least 3 seconds after power up to allow the SQ to initialize. I wait 5.
The first line sets the NMEA parameters. $03 and $10 must start every command. $7A is the NMEA command. The $01 sets the message interval. 1 = 1 second. 5 = 5, etc. The next $03 is the output message. In this instance it is the GLL and GGA sentences. Both of these have pretty much the same Longitude/Lattitude and time info, just formatted differently.
If you have a PC interface, you can see the NMEA output either on Microcode studios or hyperterminal. If not, I will try to copy the output to you in a subsequent post.

The second line sets the SQs port to 4800 baud out, among other things. These two lines are all you will need to use the SQs output with a PIC. Hope this helps,

Ron

claxon
- 17th February 2005, 17:21
Great Ron,

will give it a try this evening then report back to you
looks like tsip command packets to me (via serial)
but a little confused here
on page 69 SQ system designer reference manual it is stated that the packet format is :
{DLE} {id}{data string bytes} {DLE} {ETX}
where:
{DLE} is the byte 0x10
{ETX} is the byte 0x03

in your example:
{ETX} {DLE} ...........{DLE} {ETX}

I have to check it out.
anyway great support

thanks,
claxon

Ron Marcus
- 17th February 2005, 19:38
I got those lines of code directly from Trimble. They worked on the two modules that I have, but I haven't tried removing the leading 03. My next task is to detect loss of satelite signal, so the PIC doesn't send a bunch of zeros through the OSD to the video transmitter.
I did put a 100 uS char_pacing delay for the serout command. This seemed to make the transition more reliable.

Ron

claxon
- 18th February 2005, 15:34
Hi Ron,

well, after setting up the receiver with the TSIPCHAT (without battery backup) to use NMEA output 4800 8N1, i have powered it off for 24 hours, then conect back to PC with serial port monitor and there is still NMEA sentences being output at 4800 8N1.

I have not used the serial output string from Trimblebut wonder why they dont use packet 8E-26 which is non-volatile memory storage at the end.

I'll took it for granted that it works for you, and waiting news of gps string parsing and filtering.

I forgot one more question as I move forward to connect SQ to PIC, how do you connect them, use level shifter like max232 or directly ?

thanks
claxon

Ron Marcus
- 19th February 2005, 16:32
Following is right out of the manual...

$GPGLL,llll.lll,a,yyyyy.yyy,a,hhmmss.ss,A,i*hh<CR>
<LF>

Field # Description
1,2 Latitude, N (North) or S (South)
3,4 Longitude, E (East) or W (West)
5 UTC of position
6 Status: A = Valid, V= Invalid
7 Mode Indicator
A=Autonomous Mode
D=Differential Mode
E=Estimated (dead reckoning) Mode
M=Manual Input Mode
S=Simulated Mode
N-Data Not Valid
hh Checksum

You can use the commas as delimiters to count fields. I have a routine that will put out the last valid capture if the incoming stream is corrupted, or, the satelites are on coffee break.

$GPGGA,hhmmss.ss,llll.lll,a,nnnnn.nnn,b,t,uu,
v.v,w.w,M,x.x,M,y.y,zzzz*hh <CR><LF>

Table C.4 GGA - GPS Fix Data Message Parameters
Field # Description
1 UTC of Position
2,3 Latitude, N (North) or S (South)
4,5 Longitude, E (East) or W (West)
6 GPS Quality Indicator: 0 = No GPS, 1 = GPS, 2 = DGPS
7 Number of Satellites in Use
8 Horizontal Dilution of Precision (HDOP)
9, 10 Antenna Altitude in Meters, M = Meters
11, 12 Geoidal Separation in Meters, M=Meters. Geoidal separation is
the difference between the WGS-84 earth ellipsoid and meansea-
level.
13 Age of Differential GPS Data. Time in seconds since the last Type
1 or 9 Update
14 Differential Reference Station ID (0000 to 1023)
hh Checksum

Either one will give you the info you need.

Ron

claxon
- 19th February 2005, 18:13
Great Ron,

I will give it a try with GGA first to see how is it going, with all this parsing thing. What i want to achieve is a module that when it will pass beyong some defined perimeter to issue an alarm.

regards

claxon
- 21st February 2005, 17:17
Hi Ron,

just wondering how I can change the baudrate and parity because:
- Lassen SQ reverts to 9600 8-O-1 at factory default;
- then you switch to 4800 8-N-1 NMEA output;

SQ receiver cannot have different tx/rx baudrates as stated in manual.

so will be nice to see how u do that baud changing , namely the communications thing.

regards
claxon

Ron Marcus
- 8th March 2005, 19:15
I finally got the interface up and running. I used the Trimble code posted, sent at 9600 to change the output to NMEA format. The unit cannot be communicated with in this mode, but NMEA is one way output only. The reason I did not store these settings in flash on the receiver, is because the flash write would not work on the two units that I have.
I an using the GGA output, but the GLL will work just as well. I am using Serin2 and parsing with the "wait" statement until I get the data I want. It works well if the receiver has a satelite lock. You can poll the received string to see if it has enough sats in view, but I just used an if then statement to look for the "N" or "S" in the LAT field. It works fine.

Look at picbasic.co.uk/support/Gpsmon.bs2
Don't invert the serin stream since it is not true RS232

claxon
- 9th March 2005, 15:39
Hi Ron,

Glad for you. Here same but using BatBackup and changing the SQ's usart setup via PC, before mounting it on the PCB.

Well as I am not very used to picbasic language, still could not find the way you use SEROUT for 8-ODD-1 .

Any help welcome.

Claxon

Ron Marcus
- 9th March 2005, 19:15
[QUOTE=claxon]Hi Ron,



Well as I am not very used to picbasic language, still could not find the way you use SEROUT for 8-ODD-1 .


<Reply> I don't. I just used the default serout2 command. My belief is that the "0" in 8-0-1 means no parity. In any case, it worked. I did fiddle with the baud rate a bit because I was using the INTOSC at 8 MHz. A crystal or resonator would end that. Good luck!

rwilson
- 13th August 2005, 12:41
Hi,

I am starting in GPS, but I have some dudes. I have a circuit that work with 5V and it has a PIC16 and a program to decode NMEA but I want to buy a Started Kit but I don`t know if I use a SmartAtenna F02 or Lassen SQ. The problem is that SmartAntenna works with 5V but is very expesive. Trimble es cheaper but works with 3.3V. My question is, Do I need a special interface to connect the Lassen SQ to PIC16 even its working to 5V?

Finally, Do I need a backup power to conserv NMEA protocol as default?

Thanks.

claxon1
- 19th August 2005, 09:23
Hi rwilson,


Do I need a special interface to connect the Lassen SQ to PIC16 even its working to 5V?.

Yeap, you do need a MAX232 like, level shifter. BTW , the IQ version is better.


Do I need a backup power to conserv NMEA protocol as default?

That is an Yes too if you want to keep the module settings, including NMEA sentences, NMEA protocol, and Serial comm port settings.

Good Luck

rwilson
- 20th August 2005, 22:21
Hello Claxon,

I saw the manual of Lassen iQ and says "User settings such as port parameters, NMEA, and TAIP configurations can be stored in the receiver`s non-volatile (Flash) memory. Theses settings are retained without application of main power or battery back-up power." The same manual say "Port 2 default output languaje: NMEA"

Then I think Lassen iQ doesn`t require batery back-up to conservs NMEA output languaje, Is it right?

Roger

claxon1
- 22nd August 2005, 18:34
Roger,

You are right.

And if u are using the IQ and :

If you don't need RTC(keeping) info in your application , neither quick position fixes on start-up then just forget about battery. Leave some place though on your pcb to accomodate it if you'll need it later. I will set NMEA out (needed sentences if other than default) at first time prog then it will stay in flash mem. Use the second com port. See also my message dated 18th february in this thread.

Good Luck

Angelica
- 30th August 2005, 05:15
Hello. Im working with a GPS lassen sq, and i conect the gps to max 232 and connect this to the serial port, but i run the SQ Monitor and don't have results. You can tell me how is the correct connection of the GPS and de serial port.

Thank you very much

rwilson
- 2nd September 2005, 22:06
Hello. Im working with a GPS lassen sq, and i conect the gps to max 232 and connect this to the serial port, but i run the SQ Monitor and don't have results. You can tell me how is the correct connection of the GPS and de serial port.

Thank you very much

Hello Angelica,

I really havent worked in a similar proyect. But in the next internet address you can get the next documents:
- Lassen iQ Pin connections.PDF, this document describes how connect the Lassen iQ/SQ when the RXs pins arent used to communications. You need to know that there are a difference between the connections when you programm the Lassen iQ/SQ and when you use it to report GPS messages.
- Lassen-IQ GPS EVK Schematic.PDF, this document describes how connect the Max232 to Lassen iQ/SQ and Max232 to PC.
There are other documents that can help you in the same address.


http://www.sparkfun.com/shop/index.php?shop=1&cart=385401&cat=63&

in other case you can access with "www.sparkfun.com" and go to "GPS" and next to "Modules".

Angelica
- 14th November 2005, 06:44
Hi, i want change NMEA for TSIP output of my GPS lassen SQ

I go to the tsip104 in DOS and set te configuration but ehn i press enter show me
....waiting for reply(0x7B)
and never change

Please Help me

Thank you very much

Ron Marcus
- 14th November 2005, 19:30
Hi, i want change NMEA for TSIP output of my GPS lassen SQ

I go to the tsip104 in DOS and set te configuration but ehn i press enter show me
....waiting for reply(0x7B)
and never change

Please Help me

Thank you very much

What this means, is that the unit is at a different baud rate than the terminal program. Are you getting any legible data on the screen? If so, what speed id TSIPchat running at? If you don't know, or are gettong garbage, you can change the TSIP comms speed until you get data. Next, do a software reset, and that should bring you back to factory default. Next, try again. When you change from TSIP protocol to Ascii, you will not get a legible ack from the module. See if the change worked, and don't worry about a reply...

Ron

Angelica
- 15th November 2005, 04:48
Thank's RON, efectivelly the baud rete of my port was different that the baud rate of the aplication

Thank you for your help

kohatya
- 22nd November 2005, 12:13
I have purchased one piece but no starter kit.
Need suggestions on how to get started.

Kohatya

Ron Marcus
- 22nd November 2005, 15:19
I have purchased one piece but no starter kit.
Need suggestions on how to get started.

Kohatya

My first suggestion will not be helpful...Return it. Get the IQ instead. Here's why. The SQ speaks in a Lassen protocol called TSIP. It Tsucks! It is obscure at best, and difficult to work with. That being said, if you are going to stick with it, you will need a RS232 level converter to allow it to speak with your PC. Next download the Tsipchat utility from the website, and reprogram it for NMEA output at 4800 baud. You can burn it into the onboard eeprom and then you are ready to install it in your app, sans the level shifter. The IQ has a dedicated NMEA output, once per second, which eliminates this step. The connectors are another story, they are available from another vendor in sample quantities. The manual has the sources of parts.

(Gripe)
(One comment here, the price of the development kit is obscene, and unjustified. I had to buy one because this is what my customer wanted(and paid for). THe ZX modules by Wonde Proud, as sold by this site's sponsors is a much better value, and the development board is much less. If you buy one, I get my standard $0.- commision.)
(Gripe ends)

Next, do a search on interfacing the basic stamp to a gps engine, there is a great part of the code which looks for the GPGGA header then downloads the coordinates to RAM for your purposes. Ii's easy to adapt to PBP. Finally, go run around outside and see where you are!

Hope (most of) this helps,
Ron :)

F1CHF
- 2nd July 2012, 15:30
hello
my objective is to get the 1PPS signal to synchronize a 10 Mhz VCXO
for the moment I spend hours to understand how to "speak" with this GPS Receiver
I got a lot of sotware .. TSIP104 seems the best one
for the moment the 1 PPS is a 0,5 PPS ! with a very short Positive pulse (0,2S)
I have done a very big program to monitor it !

essai:
if PPS = 0 then goto essai
high ledrouge:pause 100: low ledrouge:pause 100
goto essai

I works ! but not very wonderfull, may be the 12F675 int clock has problem
to sample the 3,3 volts signal (1PPS from GPS) because the flashing is not OK all the time
I see in the GPS datasheet that PPS signal can be setted with many options
One could be good for me "option that say that PPS signal will be avalaible if the receiver
see at least 3 sats" I didn't find how to set up this condition
eitheir in NMEA or TSIP mode ..
If "somebody" has done with this PPS signal, any input will be appreciated
thanks
Francois

ScaleRobotics
- 2nd July 2012, 16:05
Have you seen this?

http://www.picbasic.co.uk/forum/content.php?r=206-Using-a-16F628A-to-indicate-reliability-of-a-10MHz-reference

F1CHF
- 2nd July 2012, 16:36
Hello
Yes I know .. also called 3DFIX
it is good to know if the GPS is in the 3D state
In my case the receiver is in 3D state with 5 sats "connected"
By the 1PPS is still "crazy" 0,5 PPS, I will try to play with interrupt to see waht append, but not so easy.

I have done a small app, LED is flashing to give the 3D state (1,2 or 3 flashes) it is enough ..
thanks for your input
Francois

ScaleRobotics
- 2nd July 2012, 17:00
Here is a link for someone that is doing something similar, with a PIC18F. It looks like they share the hex and assembly code. They do seem to do a pretty good job of explaining it in the two .pdfs

http://ve2zaz.net/GPS_Std/GPS_Std.htm