i use the interrupt on change on portb. I detect the signals on portb4-portb7.
in the interrupt-routine #int_rb i detect the changes on portb.
BUT:
the interrupt_flag RBIF will be cleared at the end of the routine.
What is if i get signal during the interupt - routine, but the RBIF is set and only cleraed at the end!
Do you think I will get a loss of data??
Best wishes,
Mike
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Posted: Tue Jul 12, 2005 6:31 am
That's why you keep the interrupt as short as possible. You can also use the NOCLEAR option and clear the flag yourself at the begining of the routine.
Ttelmah Guest
Posted: Tue Jul 12, 2005 6:35 am
Remember also, that you must read the port, before resetting the flag.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum