jayanth.devarayanadurga
Banned
- Joined
- Dec 4, 2012
- Messages
- 4,280
- Helped
- 822
- Reputation
- 1,654
- Reaction score
- 791
- Trophy points
- 1,393
- Location
- Bangalore, India
- Activity points
- 0
I am doing a Vehicle Tracking System. My GPS works baudrate 4800 bps. I am using PIC18F46K22 at 20 MHz. I am just testing the receiving of GPS data. If I use ring buffer then it doesn't work. If I use just an ordinary buffer then I don'r get all the data. I am testing by echoing the data back to UART and watching the echo on PC. My GPS data frequency is 1 Hz. Please tell me how to receive GPS data properly and display it on PC?
If my ISR contains the below code it doesn't work but if I don't use ring buffer then it echos some part of the data.
If my ISR contains the below code it doesn't work but if I don't use ring buffer then it echos some part of the data.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 void Interrupt() { if(RC1IF_bit){ if(i > MAXBUFFSIZE)i = 0; gpsData[i++] = RCREG1; gpsData[i] = '\0'; } }