Hi,
I have interfaced a Garmin GPS to my ARM based microcontroller (LPC 1768) using serial communication. These are the steps am following to read the data
1. Read first 2000 characters from Receiver buffer register and store it in an array.
2. Whenever the count reaches 2000, disable the interrupt and set a flag to 1.
3. When flag is set to 1, parse the characters from the stored array and search for pattern match and when pattern matches extract latitude and longitude.
4. Enable the interrupt again and set the flag to 0 to read the next set of characters.
But with this approach I'm losing the bytes. Pattern doesn't match.
UART initialization includes.
1. Baud rate set to 4800 bps..same as the GPS.
2. Enable Receiver FIFO to receive single character at a time.
I have set the buffer size to a very high value i.e 2000 with an intention that at some point of time, I might receive the data format which i require.
Please help me figure out where am I possibly going wrong?