This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Receive gps with 80c31

hello,

how can i receive gps transmission with the serial port
and analyze the date and time and store it in the program memory (c language) ?

the gps is communicatin with the following port configuration:

1200 baud
7 bit ascii
odd
1 stop bit

the gps telegram is: FDDD<c1>HH<c2>MM<c3>SS<c4>mmmQ
F - gps mode
<c1> - character between day and hour
<c2> - character between hour and minute
<c1> - character between minute and seconds
Q - character fot time quality

thanks in advance.

Parents
  • The GPS should be able to send the year, but not the century.

    But if you have a GPS that doesn't send NMEA data, then you have to either post the name of the GPS and see if someone else knows anything about it, or google for the name and see if you can find any information.

    The RTC should have a year field - but you must first set it of course. You need to read the datasheet for the RTC. And you need to learn C. Combine that knowledge, and it should be trivial to program an RTC. There are many RTC on the market, and very many of them are suitable. The question is how long time you must be able to keep the time. If it is enough to keep it a couple of hours, then you can often manage with the RTC that a lot of microcontrollers has. If you need to keep it for a couple of months up to a couple of years, then you could go for an external RTC with a separate Li-Mn coin-type battery.

Reply
  • The GPS should be able to send the year, but not the century.

    But if you have a GPS that doesn't send NMEA data, then you have to either post the name of the GPS and see if someone else knows anything about it, or google for the name and see if you can find any information.

    The RTC should have a year field - but you must first set it of course. You need to read the datasheet for the RTC. And you need to learn C. Combine that knowledge, and it should be trivial to program an RTC. There are many RTC on the market, and very many of them are suitable. The question is how long time you must be able to keep the time. If it is enough to keep it a couple of hours, then you can often manage with the RTC that a lot of microcontrollers has. If you need to keep it for a couple of months up to a couple of years, then you could go for an external RTC with a separate Li-Mn coin-type battery.

Children
No data