- This topic has 2 replies, 3 voices, and was last updated 12 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › gps
Hi.
I’m doing a project with atmega16 and a gpsboard of sureelectronics. They are connected by rs232 with baud 9600. the clock is 7.3728MHz. So in URRL I have 0x2F.
In scope I see the write data, but in the code that I’ve wrote it is a timing problem. It can’t get the data in the right sequence. For exemplewen it get $, it find the G much time after that.
Someone can help me?
Tnak You
You are not getting the letter G coming next to $. You are not able to read the values in the correct sequence. you can do polling on the flag bit of receiving data serially.
do not use any delay after reading any value, until you get the desired sequence…
Hi meri,
The UBRR value is correct for 9600 baud rate with 7.3728MHz crystal, As midhun said try reducing delay and try polling method to debug your problem.
Are you directly dispalying data as you receive it, if yes don’t do so. Store your data in the buffer first and then process it.