patricktran
New Member
Hi, I ve been confused by the concepts of these 2: interrupt and polling.
, polling means the MCU keeps checking a flag to indicate if something happens.
With interrupt, MCU is free to do other things, and when "something" happens, an interrupt is generated to notify the MCU. So it means the MCU does not need to check the flag!!!!
Thats the theory. However, I remember with TMR0, when overflow occurs, an interrupt generated which makes pin T0IF in INTCON reg High. Therefore the MCU also needs to check this flag to determine if the interrupt occurs. :?
Why? :?: so what the advantages of interrupt?
Thanks
, polling means the MCU keeps checking a flag to indicate if something happens.
With interrupt, MCU is free to do other things, and when "something" happens, an interrupt is generated to notify the MCU. So it means the MCU does not need to check the flag!!!!
Thats the theory. However, I remember with TMR0, when overflow occurs, an interrupt generated which makes pin T0IF in INTCON reg High. Therefore the MCU also needs to check this flag to determine if the interrupt occurs. :?
Why? :?: so what the advantages of interrupt?
Thanks