do while in an interrupt
i want program short delay inside interrupt generated timer1.
delaymicroseconds() doesn't seem work, if there conflict having set timer1. tried following code check micros() in loop until appropriate time has passed. works fine in main loop, hangs program when it's in timer1 interrupt routine, or when in int.0 interrupt.
any suggestion? i've spent couple hours on this.
delaymicroseconds() doesn't seem work, if there conflict having set timer1. tried following code check micros() in loop until appropriate time has passed. works fine in main loop, hangs program when it's in timer1 interrupt routine, or when in int.0 interrupt.
any suggestion? i've spent couple hours on this.
code: [select]
tmp = micros();
while (micros() - tmp < 500) {
}
quote
any suggestion?
you try posting code.
Arduino Forum > Using Arduino > Programming Questions > do while in an interrupt
arduino
Comments
Post a Comment