I think that the Arduino Plumbing manual is a big step in the direction you want, especially since the current manual does not include the mobile "pi" constructs and is thus very simple to understand. We can brag that it works for a chip with 2KB memory! "Plumbing" is an inspired name, by the way. I hope you can get multiple Arduinos talking, so as to do real projects like a 3D printer. On Oct 1, 2012, at 2:45 AM, Ian East <ian.east@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I wholeheartedly agree. Start them on firmware and microcontrollers - making real things work - kids love this!
I never found that a problem. The only thing I have no use for is ALT (everything in the real world is PRI ALT; you have to work rather hard to get a fair ALT), but PRI ALT (in a loop) is the exact formalization of the construct you gave. I am a strong proponent of the Transputer-occam PRI PAR, which addresses a completely different problem from PRI ALT. It is a language feature that embraces both standard "main" code and interrupt code. Most chips enter ISRs with interrupts disabled and remain that way until you IRET, unless you specifically program an STI, and this is just what PRI PAR does. That causes the interrupts to "round-robin" which had better be OK (assuming you are writing "slim" ISRs) because otherwise your event response burden is too much to handle. Bulky "soft" interrupt response code can be in "main" interruptible space, prioritized, almost always, by PRI ALT and booleans. The beauty of PRI PAR is that interrupt code does not have to be some weird, alien beast that is totally different from "regular" code.
That is there, in Arduino Plumbing.
PERFECTLY STATED! That could be our slogan, really. Combine it with the fact that the real world has concurrency and you are forced to our position. Larry
|