GPIO interrupts
Alan Adams (2486) 1149 posts |
Is it possible to get an interrupt when a GPIO pin changes state? I want to use the interrupt to grab the current time, store it and change a poll word so that a BASIC program can access the time with a high degree of accuracy. I’m assuming this will need to be done in a module, but if it isn’t possible to cause an interrupt, then it isn’t worth taking it any further. Polling for an event fast enough to achieve the accuracy will prevent anything else useful from being done. (Actually I will need to do this for two pins, storing two separate times.) |
Timo Hartong (2813) 204 posts |
I presume you are referring to a Pi. If so the answer is most likely yes. See page 113 of the hardware manual for the interrupt numbers of the GPIO pin groups. The interrupts start on page 109. In chapter 6 General Purpose I/O (GPIO) starting on page 89 one can read it is possible to get an interrupt on a change on the pins. |
Alan Adams (2486) 1149 posts |
Is this a paper manual? The downloadable ones seem to be split into a multitude of sections, and it’s not clear which ones would apply. I might have to read all of them… |
Timo Hartong (2813) 204 posts |
No, unfortunately not. I think you will have a hard time to find a paper datasheet from a modern chip. If you want to have the paper one. Just print it. You can find the datasheet here : To save you the trouble of getting through the entire document I have put the page numbers with relevant information ;-) |
Alan Adams (2486) 1149 posts |
Thanks. That looks more useful than |