Thanks for the ideas.
Amgen sadly the hardware is from an old project the 10.4K serial is fixed on normal pins and the 9.6k continious data is on the usart.
Languer at the moment when the RX INT fires my routine gets the incomming byte and fires it straight out of the USART TX, it then checks in case a second byte has arrived (Two tend to arrive together) and repeats the above if it has. Then it returns and by that time has missed a byte on the other serial in data.
My INT Handler looks like this.
Code:
'-------------------------------------
' INTERUPT HANDLER
'-------------------------------------
INT_Serin: 'Serial Interrupt routine
IF OERR Then usart_error 'Check for USART errors
ptr_in = (ptr_in + 1) 'Increment ptr_in pointer (0 to 48)
IF ptr_in > (BufMax-1) Then ptr_in = 0 'Reset pointer if outside of buffer
IF ptr_in = ptr_out Then Buffer_Error 'Check for buffer overrun
HSerin [buffer[ptr_in]] 'Read USART and store data in next empty location
ptr_out = (ptr_out + 1) 'Increment ptr_out pointer (0 to 48)
IF ptr_out > (BufMax-1) Then ptr_out = 0 'Reset pointer if outside of buffer
bufchar = buffer[ptr_out] 'Read buffer location
HSEROUT [BufChar] 'Send the character
Toggle RedLed 'Flash the Red Led
IF RCIF Then INT_Serin 'Check for another character while we're here
@ INT_RETURN ;Return to program
Bookmarks