A few ideas perhaps...
I could substitue a 18F2620 which i have tried but I haven't got the clock speed/usart settings or anything right with that :?
It worked at 8mhz but not at 32MHz.
I did set the osc define to 32.
I believe you need to specify the PLL as active to get 32MHz from the 8MHz (which I think is what your trying to use).
I'm guessing you have something like this:
Code:
Main Loop:
loop doing SERIN stuff
Interrupt Service:
Service HW USART for receive data, and re-send
Perhaps you can create a ring buffer, and every time the HW-UART interrupt fires save the the data. The main loop would then look like.
Code:
Main Loop:
Disable HW-USART interrupt
Check HW-UART TX buffer is empty
If empty, send next ring buffer data through HW-UART (you will do this writing directly to the TXREG and not using HSEROUT)
Do SERIN stuff
Enable HW-USART interrupt (for receive only)
Interrupt service would then look like:
Code:
Interrupt Service:
Service HW USART for receive only (store in ring buffer)
Bookmarks