Murat.
Perhaps you are experiencing a USART overrun condition in your ISR when you are reading the packet from the PC using "HSERIN".
I would try a couple of things to narrow this issue down.
1. Comment out the following line at the beginning of your code "DEFINE HSER_CLROERR 1".
Then add the following 3 lines in your ISR:
Doing this will let you know via your LCD if you are experiencing an overrun and at which byte position it occurred in.Code:For i = 0 to 127 if RCSTA.1 = 1 then 'Add this line "OERR: Overrun Error bit" lcdout $fe,1,"Overrun Error: ", dec3 i 'Add this line endif 'Add this line HSERIN [HEX2 H[i]] next I
2. If you are experiencing overruns, then lower your baud rate to 2400 and see if the problem stops.




Bookmarks