http://www.electronics-base.com/useful-info/software-related/90-polling-vs-interrupt
So here is one guy that disagrees with you!
Interrupts are more efficient at servicing hardware requests......and a button is an piece of external hardware.
One advantage of using interrupts that I particularly like is that you can precisely control button repeat depending on the mode of the interrupt - FALLING, RISING, HIGH, LOW.
It is less convenient to achieve this via polling.
A) The first method is the simple one - Polling:
In the Polling method, the microcontroller must "access by himself" the device and “ask” for the information it needs for processing. In fact we see that in the Polling method the external devices are not independent systems; they depend on the microcontroller, and only the micro is entitled to obtain access to the information it needs.
The main drawback of this method when writing program is waste of time of microcontroller, which needs to wait and check whether the new information has arrived.
The microcontroller continuously monitors the status of a given device. When the condition is met, it performs the device. After that, it moves on to monitor the next device until everyone is serviced. The microcontroller checks all devices in a round robin fashion.B) The second method is - Interrupt:
Interrupt is the signal sent to the micro to mark the event that requires immediate attention. Interrupt is “requesting" the processor to stop to perform the current program and to “make time” to execute a special code. Whenever any device needs its service, the device notifies the microcontroller by sending it an interrupt signal. Upon receiving an interrupt signal, the microcontroller interrupts whatever it is doing and serves the device. The program which is associated with the interrupt is called the interrupt service routine (ISR) or interrupt handler.
The “request” for the microcontroller to “free itself” to execute the interrupt could come from several sources:• External hardware devices. Common example is pressing on the key on the keyboard, which causes to the keyboard to send interrupt to the microcontroller to read the information of the pressed key.
• The processor can send interrupts to itself as a result of executing the program, to report an error in the code. For example, division by 0 will causes an interrupt.
• In the multi-processor system, the processors can send to each other interrupts as a way to communicate.Here are some examples of interrupt sources on one microcontroller
1
There are many advantages of using Interrupts. The microcontroller can serve many devices. Each device can get service based on the priority assigned to it. The microcontroller can ignore (mask) a device request. The use of microcontroller is more efficient.
Definition of ‘Interrupt’
Event that disrupts the normal execution of a program and causes the execution of special instructionsWhen interrupt occurs microcontroller saves whatever it is currently doing and executes corresponding ISR code. When this part of code finishes saved data gets restored and programs continues where it was paused by interrupt as ISR didn’t even happened. This is shown on next picture.