interrupt's importance


i want know why need interrpts? main purpose of interrupts , when need it.
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.


Arduino Forum > Using Arduino > Microcontrollers > interrupt's importance


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

Rasperry Wifi LAN Controller - Raspberry Pi Forums

Unlock car with bluetooth and car key