Sounds like it's working exactly like it should be.
1. TMR1 interrupts while it's sitting in your SERIN routine waiting for 3 ASCII characters
followed by the byte that gets placed in code (which by the way hasn't been declared).
2. Once the interrupt service routine executes, it returns right back to your SERIN
routine with the LED off.
Insert a toggle command in your int handler for a quick visual indication of the int handler
executing. That would tell you it's working or not.
And -as-is, it's never going to execute any code below your SERIN routine unless all 3 ASCII
characters + the byte that goes into your undeclared code VAR are received.
Bookmarks