I've been examining the code some more, and I think I found the problem. In the interrupt section, if the end of buffer is reached, he stops putting new chars in the buffer. In the input consumption routine if the end of line character is never reached no action is taken. I'm not sure what causes the freeze of the heartbeat LED, but I think the big culprit is solved.
I've been looking at this code for a long time, and I've been avoiding this particular problem because I wasn't able to reliably reproduce it until I got lucky yesterday. It will be good to get rid of it. Still, I think the idea of a lex that produces code for PICs is a useful one.
|