interrupt's importance
i want know why need interrpts? main purpose of interrupts , when need it.
your comments , guidence appreciated.
thanks,
your comments , guidence appreciated.
thanks,
for example when have sketch, detects buttons , turn on leds, , checks serial port incoming data.
suppose sketch busy that, serial data being received.
at moment serial data has read , placed buffer.
that done in interrupt routine.
if have "delay(1000);" in sketch, serial data still being received, because interrupt executed during "delay(1000);"
the sketch still running, , doesn't know interrupt occured. once sketch requests serial.available() can read the serial data buffer.
also wire (i2c) library uses interrupts.
you use interrupts yourself, when has done @ moment.
suppose sketch busy that, serial data being received.
at moment serial data has read , placed buffer.
that done in interrupt routine.
if have "delay(1000);" in sketch, serial data still being received, because interrupt executed during "delay(1000);"
the sketch still running, , doesn't know interrupt occured. once sketch requests serial.available() can read the serial data buffer.
also wire (i2c) library uses interrupts.
you use interrupts yourself, when has done @ moment.
Arduino Forum > Using Arduino > Microcontrollers > interrupt's importance
arduino
Comments
Post a Comment