A common task in embedded programming is checking when the state of pin has changed. You can write software to poll a pin's state, or in the case of AVR you can set up an interrupt. An interrupt can be used to notify your program when a pin state has changed.
read more | digg story