SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By powergravity
#195033
Hello,

I am realizing that the PPS pin of my Venus GPS doesn't send any signal. I am not able to make it work....

After having read the data sheet of the GPS, I saw :
Image

Hence I try to send the following message to the GPS:
Code: Select all
   // PPS message:
   byte PPSmessage[] = {0xA0, 0xA1, 0x00, 0x03, 0x3E, 0x01, 0x01, 0x3E, 0x0D, 0x0A};  
   gps_port.write( PPSmessage, sizeof(PPSmessage) );                                  
   gps_port.flush();                                                                           
but nothing changes.

Is there someone who has ever had a similar problem?

Thank you in advance,
Pm
By gm
#195045
Perhaps the checksum is wrong. It appears that you just copied the value from the example but have changed the values for fields 1 and 2.
By powergravity
#195046
Thants for your answer. I don't think that the problem comes from the CS because [0x01 0x01] leads to the same CS than with [0x00 0x00], right?

Have a good day,
Pm
By Valen
#195051
In general, a checksum is the summation of a number of bytes. And then of the final sum only the least significant byte is used. Any higher significant bytes are discarded. Sometime the final byte is bit-inverted or subtracted from a constant or XOR-ed with a constant before inserting it in the datastream.

In your example [0x01, 0x01] a checksum would be 0x02. For [0x00, 0x00] its 0x00. The example above calculates the checksum to be 0x3E for the sequence [0x3E, 0x00,0x00]. It implies the MessageID is supposed to be included for the checksum. The piece of text that you show does not explain the finer details of how the checksum is to be calculated. And I haven't read it's manual. So make sure to check.