DT_INTS-14.bas Reset Flag
Question,
When using Darrel Taylor's
"DT_INTS-14.bas"
What does the Reset Flag Do?
When using with PIC 16F877
HSERIN
I have seen examples both ways, and did not understand how what it was used for.
Thanks
LarryD
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler RX_INT, _Getbytes, PBP, no
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
Re: DT_INTS-14.bas Reset Flag
Hi,
When the the ResetFlag "switch" in the interrupt declaration is set to YES it tells the interrupt system to clear the interrupt request flag when returning from the interrupt service routine.
However, the interrupt request flag for the USART RX is automatically cleared by the hardware when you read the FIFO buffer (which is what happens when HSERIN execute) so there's no need to have the software to clear it as well.
I can't say if it's valid for all devices but on the 16F1825 for example the RCIF is read only and can't BE cleared by software so having the ResetFlag "switch" set to yes makes no sense.
/Henrik.
Re: DT_INTS-14.bas Reset Flag
Henrik,
Thank you so much.
I have been trying to understand how to use with HSERIN, and had seen it both ways,
and wanted to understand how it works.
Thanks again.
Larryd