Is that too much stuff going on inside ISR?
What if you simplify usart logic until you get things working as expected?
Do you really need byte-by-byte reception? Can you get away with a fixed length message?
My interrupt routine looks like this:
Code:
ReceiveInterrupt:
HSERIN 50,No232,[DEC5 PicIn.byte1, DEC5 PicIn.byte0, DEC1 CommandIn, _
STR DataIn1\24, STR DataIn2\24, _
DEC5 CheckSumIn.byte1, DEC5 CheckSumIn.byte0]
RS232Flag = StateTrue
No232:
@ INT_RETURN
I check in main loop if RS232Flag was set, and then do all the processing there.
Robert
Bookmarks