Go Down

Topic: External interrupt (attachinterrupt) not working (Read 4098 times) previous topic - next topic


Hello everyone, I can't figure out why the external interrupt via the attachinterrupt() function on my arduino uno is not working.  I'm using a National Instruments card to send the arduino an analog TTL (5V) pulse into digital pin 2 or 3.  Per the instructions,  I am using the 0 interrupt designation for digital pin 2.  I've tried using pin 3 as well. Even the example code provided in the reference doesn't work.  Reference code: http://arduino.cc/en/Reference/AttachInterrupt

Are there some special requirements for the TTL pulse?  Any thoughts?  I'm stumped.



Using a different TTL input, the example code works.  So, there is something wrong with the NiDaq input. hmmmm....


Without wiring drawings and your sketch posted how are we to tell why it's not working for you? We can state that attachinterrupt command does function as designed when both the hardware and software is properly done. Did you wire a common ground from the NiQaq to the arduino? Are you relying on another interrupt to force you out of your ISR function? Interrupts are a powerful feature of the arduino platform, but many details must be correct to get useful results.



I figured it out.  I wasn't giving a 5V pulse from the NiDaq.  My oscilloscope was amplified 10X, so I was only giving a 0.5V pulse... Doh...


--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard



Spam in Chinese characters removed.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Go Up