Page 1 of 1
UART Hardware Interrupts and circular buffers
Posted: Thu Dec 18, 2014 10:57 am
by Sefi
Can anyone point me in the right direction on implementing a UART hardware receive interrupt and loading the received byte into a circular buffer please?
I use Flowcode version V5.5.2.1
Any help would be greatly appreciated.
Many thanks.
Re: UART Hardware Interrupts and circular buffers
Posted: Thu Dec 18, 2014 1:14 pm
by medelec35
Hi Sefi ,
Have you seen
this post?
It has a flowchart example of a circular buffer that uses RX interrupt.
Martin
Re: UART Hardware Interrupts and circular buffers
Posted: Thu Dec 18, 2014 1:46 pm
by Sefi
Thank you for your quick response.
I am actually using a highly modified Zigbee component and finding that because of the workload of the uP, it is missing a lot of data arriving on the Zigbee. I wanted to use interrupts and a circular buffer to avoid missing data. The Zigbee is attached to UART2 on a Pic 18F66K22. I have enabled RXTINT2 but it never seems to be called. The LCD attached to the unit is driven via a Custom component (ILI9341 driver chip).
The attached FC file has been stripped down to the bare minimum to try ad see what comes via the interrupt routine and the UART. Could you please tell me what is wrong with it.
many thanks
Sefi