Hi,
Do you have to echo the char from within the ISR? Perhaps you could set a flag indicating that there is data to send and then do the sending a out_ptr handling in the main routine. That way you'll spend less time in the ISR. Changing:
toCode:bufchar = buffer[ptr_out] 'Read buffer location HSEROUT [BufChar] 'Send the character
Might also save a couple of cycles.Code:HSEROUT [buffer[ptr_Out]]
However, I think the main culprit is the saving/restoring of the system variables when entering and exiting the ISR (which DT-INTS does for you). You should be able to run the 18F2620 at 32Mhz by enabling the PLL as languer says.
Just thinking out loud.....
Bookmarks