Notes for TinyOS

The background documents are:

Notes for TI's MSP430 Programming on Linux

A Few More Notes From Lecture

TinyOS, C, and more

Significant point: in the embedded world, C programs are mostly variable assignments and if statements.

TinyOS is a strange little system. Every time we build an application, we are in effect building a system specifically for this application

Dr. Herman showed us TinyOS-Blink, and showed us how this particular little program works.

In particular, this was very interesting when he went to app.c after making the program, showed a lot of the lower level sorts of details of implementation.

This program uses "busy wait" - the processor is "busy" while waiting, actually doing computations and thinking and consuming power.

We all had a great laugh when Dr. Herman recompiled the code and set the yellow bit, but then the blue bit lit up. Point is, don't always trust the methods you're calling to do what they seem to say they will do.

"waiting" loops are commonly used, but shouldn't be used in industry, as it is wasteful of energy

Then we moved on to a different program, a better way to do the Blink program. This program is better than the previous Blink, because the waiting mechanism used in the second program is one that will actually put the processor into a low-power mode where it is drawing much less current, and not just waiting for a loop to run so many times. This would be called an "interrupt wait".

And now for "Advice from somebody old and crusty" - an assembly busy-wait algorithm in C!!! (this is included because the line was so funny)

Mar23Notes (last edited 2014-05-25 18:15:49 by localhost)