Hi ! I see a post here :
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1143470863Oliver Keller say :"I set up an external interrupt service routine, that's listening on pin 8 (the only pin that can do that on an arduino board). "
I very want a way to set up an interrupt service routine in Arduino ( timer interrupt and external interrupt ) I see his code :
<code>
void irHandler(void){
// external interrupt service routine
timeL = ICR1L; // read time since last reset
timeH = ICR1H;
pattern[count]= (timeH << 8 ) | timeL;
//pattern[count] = millis(); //another attemp, I don't which is more clever
count++;
somethingHappend = 1;
}
timerAttach(TIMER1INPUTCAPTURE_INT, irHandler); //attach service routine
</code>
but I can't find the cmd "timerAttach" in Arduino , Is there a way to set up an interrupt service routine?
if somebody know that , could you tell me a example ? thank you !
and I see the PinMapping :
http://www.arduino.cc/en/Main/PinMappingthe int0 and int1 is pin2 pin3 , how to use them , and why Oliver Keller say :"that's listening on pin 8 (the only pin that can do that on an arduino board). "?
thank you !