You may like to try this change as suggested in red. It might work, but might cough a little at higher repetitions. You may actually want to do away with the pause 10 altogether.
You need to think interrupts only if your code is doing lots of things and you have the probability of losing data. If the receive register is not read soon enough, it would overflow due to the next character coming in. If you cannot read the register fast enough, you should consider using interrupts on UART receive.





Bookmarks