views:

62

answers:

2

Suppose I have a button wired up to a GPIO line of the processor, and I'd like to have an interrupt generated whenever I press the button. Doesn this mean there should be a physical interrupt pin available on the CPU, or it's not actually exposed to outside world and interrupts are triggered internally and I can monitor them through special registers?

Or this is totally hardware specific and my question is pointless without specifying the CPU etc. ?

A: 

You're right, your question is pretty hardware specific. However, modern microcontrollers often have the ability to configure them to internally trigger interrupts depending on and edge or level trigger condition associated with a GPIO pin.

Greg Hewgill
+1  A: 

As Greg has indicated, this is hardware specific, but generally most micro-controllers GPIO's can be configured to trigger an interrupt. There may also be dedicated interrupt pins.

simon