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.
UART Interrupt Clear Question.(Solved)
-
- Posts: 217
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 1:43 pm
- Has thanked: 6 times
- Been thanked: 7 times
UART Interrupt Clear Question.(Solved)
- Attachments
-
- Serial_Test.fcfx
- (28.27 KiB) Downloaded 333 times
Last edited by seokgi on Wed May 12, 2021 10:06 am, edited 1 time in total.
-
- Valued Contributor
- Posts: 489
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 262 times
Re: UART Interrupt Clear Question.
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.
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.