Page 1 of 1

UART Interrupt Clear Question.(Solved)

Posted: Wed May 12, 2021 7:11 am
by seokgi
Hi!
I have some question.
I'm using PIC18F47Q10. I want recive via UART Interrupt.
But interrupt is not clear.

Execute user macro through receive interrupt. And when the receive interrupt comes in once,
it operates as if the interrupt continues to occur.
If someone knows how to clear the interrupt, please help.

Thank you.

Re: UART Interrupt Clear Question.

Posted: Wed May 12, 2021 8:40 am
by LeighM
Hi,

In the interrupt macro, you need to call ReceiveChar for the UART that caused the interrupt.
Doing this will clear the interrupt.

Best then to set a global flag, and then call the string send from the main loop.
Keep functionality in the interrupt routine to a minimum, sending a string from there is not advisable.

Re: UART Interrupt Clear Question.

Posted: Wed May 12, 2021 10:06 am
by seokgi
Thank you for your help.
All is clear

Thank you