I am using arduino micro, in that digital attach pin interrupt available at IO pins 0,1(Tx,rx) and 2,3(SDA,SCL) and pin 7.
Now i am using tx,rx for serial and SDA,SCL for I2c. so i am not able to use those pins for digital attach interrupt. Now only one pin 7 available. Apart from that i need 2 interrupt pins either digital or analog.
if available in analog also, it is OK. Could anyone suggest ideas to resolve this issue??
i have 3 solenoid in output, it should be turned on when respective digital io port driven HIGH. The on time of solenoid must be less as possible. 10 - 100ms. If i check in polling, after getting HIGH in my IO , it might take more time to trip my solenoid
Look it up - you can generate interrupts off lots of pins.
Though it's likely that if your program is well designed, loop() will be running fast enough to hit your 10-100ms response time target without using interrupts.
alagappan:
i have 3 solenoid in output, it should be turned on when respective digital IO port driven HIGH. The on time of solenoid must be less as possible. 10 - 100ms. If I check in polling, after getting HIGH in my IO, it might take more time to trip my solenoid
Ten to 100 ms is an incredibly long time for a microcontroller!
You most certainly do not require interrupts for this.
Your polling loop should cycle in the order of five to fifty times per millisecond, depending on how complex it is.