Quote:
Originally posted by Ian W.
Do interrupt handlers matter though?
If we could send out data as soon as an interrupt occurred, so the robot reacted right away, it might matter, but if we just have a similar "Get Input, Process Data, Ouptut, Redo" loop, it won't matter when you process a set of data, because it's all outputted at the same time, no?
I can't see having any system better than we did last year, beyond upping the speed and a better language. Beyond that though, it starts to get really complicated, and most teams would get lost, I think, in programming.
|
In a word, yes. The main advantage to interrupts is that they allow you to immediately process an event that occurs (whether that be a low battery condition or data being ready to read) without having to sit in a busy-wait loop looking for it. This means that you can be doing additional background processing at the same time.
Now, it's possible to implement a similiar system without interrupts, but it's significantly much harder and more complicated. Interrupts make the programming cleaner and easier to use.
The way the controller is set up now, interrupts are useless for the most part because all the data is read in at one point in time. If different sections of data were read at different times, this could make quite a bit of difference.
Matt