GREG NEELEY on 6 Sep 2007 12:42:11 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] Microcontroller "models" a loaded word...


Yesterday, the first controller model ordered
arrived, and I was able, using the USB interface
on this "stick"controller (model category was MSP430
Low-Power MCU)to get a simple looping C language
construct compiled and loaded as flash to the stick,
which resulted on execution to an LED flashing
in the housing containg the device as a "dongle",
hanging off of a USB port on the PC housing.

This is quite trivial (only a few LOC), but if you
are interested in experimenting with this yourself,
you can order an eZ430-F2013 Development Tool from
TI.  This is quite reasonably priced at $30.

In poking around yesterday with the documentation, I
was pleased to find that Texas Instruments Corporation
is at least supporting C++ in building code for
loadable flash modules, so some of our Texas friends
in controller engineering are beginning to see the
value of OOP.

I will warn you that there are some "organizational
problems" with the drivers available and source
code examples available, and with the
way in which source code examples can be downloaded
from TIs website, but I'm hopeful that in playing
around with the device, most of these problems will
work themselves out.

To your question, the word "model" is a loaded word. 
The problem is that
the French would use the "nuance" and would have five
or six different words for model.  In English, we have
a single word "model" to represent five or six
different objects (another loaded word).

For example for "model":
1) An RDBMS abstraction, with entities;
2) A person who appears in advertising for clothing
3) Categories of cars produced by a given auto
manufacturer, for example, the state asks you for the
"make" and "model" of your car;
4) A scaled down version of an aircraft, such as an
"airplane model", a.k.a. a toy.

The list goes on.  When I say "model controller" or
"model of controller", I was thinking along the lines
of number 3) above, which lends itself well to
inheritance from OOP.  All controllers manufactured by
TI share
some characteristics in common, so inheritance from
a base class is strongly suggested.

Will keep you updated on what is going on.
--- David Bogus <> wrote:

> Advantages of using language with introspection or
> reflection to
> generate code in a language or subset that doesn't
> have it.
> First off testing.
> Testing where you don't have to register your tests
> or suites is taken
> for granted until you have to do every time every
> test. Its about once
> every other week that you forget to register a test,
> When working in
> that environment step one is write a test with
> explicit fail and watch
> it fail. That verses extend some class and follow a
> naming convention,
> and let the automagic happen.
> Changing behavior of things for tests.
> Lets say we are using a simplistic widget library on
> some small device
> lets say a dvd player. So just for grins we want to
> make sure that
> people can use it in many languages. Here is the
> kind of test I would
> like to write.
> def testSwitchLanguage
>   languages.each do |language|
>      all_menus =
>      all_menus.each do | menu |
>        assert(language.words.contains(menu.text))
>      end
>   end
> end
> Now suppose when we call our simplistic widget
> library it takes the
> string  but doesn't allow us to get it back.
> (Imaginary reason it
> generates a bitmap immediately and frees the string
> )  So we go and
> write wrapper that delegates to the simplistic
> widget library but
> records the calls and can tell us what text the
> widget contains.
> Now I'm sure using introspection in your generated
> code would be
> awesome but thats a bit more complicated. Its not
> all that hard to
> have your dsl generate some defalut method on your
> objects like ones
> that says what method the object understands.
>   Then you can start with just tracking pointers and
> keeping a
> "omniscient" object that keeps all objects. Next
> thing you know you'll
> start wanting to be able to do dynamic composition.
>  So you take two pointers and check that no messages
> collide then you
> generate an code that delegates to on to the
> appropriate pointer.
>  Of course this is part way along that slippery
> slope to writing your
> own language.
> Question for Greg, what is the type of problem your
> solving?  I'm
> unclear about "controller models" and what that
> means to you.
> Dave
> -- 
> Dave's Definitions: Morning, is after I've slept for
> more than four
> hours. Lunch is the second meal of the day no matter
> the hour of
> consumption. A long drive is one longer then you
> have last slept.
> Ineffable, if you don't understand I couldn't
> possibly explain it.
> _______________________________________________
> To unsubscribe or change your settings, visit:

To unsubscribe or change your settings, visit: