I looked at the example code for doing I/O using the GPIO pins, but — I need to be able to count impulses (between 0.01 and 250Hz), which isn't really doable with GPIO polling on a multitasking OS.
Are the GPIO pins capable of generating interrupts?
I looked at the example code for doing I/O using the GPIO pins, but — I need to be able to count impulses (between 0.01 and 250Hz), which isn't really doable with GPIO polling on a multitasking OS.
Are the GPIO pins capable of generating interrupts?
Yes they can generate interrupts, and just yesterday some example code was posted. Note, I do not know whether 250 Hz pulses (4 msec interval) will always be reliable, depending on what other operations the R-Pi is doing (SD card I/O, USB and Ethernet, etc.) although you may be able to change interrupt priority if needed.
jbeale wrote:
. Note, I do not know whether 250 Hz pulses (4 msec interval) will always be reliable,
Normal modern CPUs can handle timer interrupts at a kHz. And they don't "lose time" by missing interrupts. So I'd say 250Hz is quite doable.
jbeale wrote:
. Note, I do not know whether 250 Hz pulses (4 msec interval) will always be reliable,
Normal modern CPUs can handle timer interrupts at a kHz. And they don't "lose time" by missing interrupts. So I'd say 250Hz is quite doable.