Can anyone post the audino code for the 2814 GPS Modue
alexhsiaochung
Posts: 4
I have an old 28146 GPS Module , it only have the sio Pin ,no rx /tx pin ,Can anyone post the audino code for the 2814 GPS Modue
Comments
You need only be sure your serial pin is set to output when sending the command and the back to input to serially receive the response.
If those are dedicated serial pins that won't work unless you can disable the TX pin. The reason is that the TX pin is always driven. So it would conflict with the SIO pin on the GPS when it is in output mode. Your RX pin would only ever see what your TX pin state is, not what is trying to be sent by the GPS module.
On a BASIC Stamp Module this works perfectly since it can only do one thing at a time and has no FIFO buffers. On a microcontroller with FIFO buffers the data sent from TX will always be received into RX and must be discarded or filtered before the response from SIO comes in.
Also, if the SIO pin has a series resistor it may not work depending on the size as there will be a voltage divider created by the two resistors.
(This code samples the number of times the beam is broken on an optical sensor for a bug trap and ties it to the GPS data when and where it was sampled. I have it running for four iterations, more if it catches too many bugs. The times will be changed before I put it into the field, but this allows for sampling without hours of waiting.)