lockman_akim
Advanced Member level 1
i allready read about interrupt..and i have doubt about external interrupt..
let say, my interrupt source is at RB0..while no interrupt flag, LED at RD0 is ON RD1 is OFF, when interrupt triggered, led at RD1 is ON RD0 is OFF..
without using interrupt, it still can happen with this code,
if RB0 = 0 then
RD0 = 1
RD1 = 0
Else
RD0 = 0
RD1 = 1
End if
so where is the speciallity of interupt function?
can anyone give me an example for some situation that i should use external interrupt?
let say, my interrupt source is at RB0..while no interrupt flag, LED at RD0 is ON RD1 is OFF, when interrupt triggered, led at RD1 is ON RD0 is OFF..
without using interrupt, it still can happen with this code,
if RB0 = 0 then
RD0 = 1
RD1 = 0
Else
RD0 = 0
RD1 = 1
End if
so where is the speciallity of interupt function?
can anyone give me an example for some situation that i should use external interrupt?