Hi All,

I've been using USART and serial interrupts to receive 7 byte commands, as was very worried that the buffer might overflow before I could service the interrupt.

I had a main loop that checked for incoming data and responded, using many IF statements. I was also using TMR1 interruots to generate a clock pulse.

When an interrupt triggered, I went to the routine, used the flags to decide what type of interrupt (Timer or USART), acted, then returned to looping in the main function.

I came up with all kinds of ideas of how to improve matters, such as dropping the baud rate to 300, or using handshaking protocols.


However, in the event I tried it at the default 2400 baud and it works absolutely fine - might be able to go higher, but haven't tried.



Just thought someone out there might be inerested, since there were quite dire warnings about interrupts and buffer overruns in the PBP manual.


Cheers,


Ben