microcontroller interrupt explanation
Share
*another explanation in the description* Watch with sound! in this video i'll explain the interrupt coding principle. the interrupt example is written to PIC16F887 but the explanation is relavent to a large variety of microcontrollers, including arduino! feel free to comment with questions and requests. if the principle is still not clear, reffer to this analogy: imagine a situation where your phone can't ring or vibrate, during every day routine, in order to know if you got a call you need to constantly look at the phone's screen, So if you are waiting on an important phone call you will check the phone every few seconds, this is like the polling principle: if(Pone_Ring()) Answer; Rest_of_Life(); if(Pone_Ring()) Answer; Rest_of_Life(); if(Pone_Ring()) Answer; Rest_of_Life(); and so on. but if your phone is fine, then you can do everything (within the legal boundaries) you want, and at the second you get a phone call a Flag will raise(you will hear the phone Ring) and you would answer it. without the need of constantly checking wheter you have a call or not. music: Paintball theme, by Bird Creek