Marechiare wrote: >> The foreground code grabs the current period value >> maybe twice a second, inverts it to make speed, and >> displays the result. > > There should be middle level (I'd say Business Level) code to deal > with the persisted state. Its output should be meaningful values, like > speed, distance etc. > > And there should be UI (User Interface) level code to display the BL > level output. I agree that what I called "foreground code" would actually be several modules. However, there is no point computing speed from period except when it's needed, which is whenever you want to display a new speed value. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist