We're using both the AVR and MSP430.

The advantages of the AVR are a large code space, an external bus for
higher speed interfaces such as graphic LCDs, and a large EEPROM where
you need a large database of user programmable parameters.

I think the AVR got to be popular because it is similiar to the PIC,
which is very popular for low cost logic applications.

We won't be using any AVRs for new projects now that ARM chips are in
the same price range and offer the flat memory scheme that is so much
easier to write code for.  The MSP430 is very close to that of the old
minicomputer, PDP-11, so for me it was deja vu.

The AVR may be faster in theory, but if you're accessing data from
program memory space a great many cycles are wasted because everything
has to be funneled through the Z register.  Unfortunately, that ripples
up into the C source code because you have to tell the compiler that
the memory is in flash rather than RAM.  It also blows normal structure
access to data stored in flash because you can't simply use a pointer
to that data to access it.  Instead you have to call a special function
with the address in flash which then gets the data through the Z
register.  I can't tell you how many times I stumbled over this issue,
but it was a considerable amount of development time.

The Z register issue also meant re-writing code that's been around
forever, like binary search, where you do pointer arithmetic but cannot
use a simple structure statement to get the next element.  And, if you
want to do binary search in both flash and data you have to have two
different functions.  I'd only consider an AVR for a new project if
Atmel was willing to pay me to use it.

With all the changes reguired in C source for the AVR, I finding that
porting AVR code to the MSP430 means a lot of rewrites to clean out
artifacts of the Z register tunnel between flash and data space.  Of
course it makes things look good again to get rid of functions calls
which retrieve data from flash, and get get back to normal C references.

The people behind gcc and gdb for the AVR have done an excellent job
especially considering what they had to work with. The tools work great.
But if you need more memory than an MSP430, then look at some of the
Philips or TI ARM chips.


Sincerely,

David Smead
www.amplepower.com
www.amplepower.net


On Thu, 16 Mar 2006, N. Coesel wrote:


And AVR parts are _expensive_.  I honestly don't see why
they're popular at all...

I guess they're a good "first microcontroller" for beginners and
students. They're available in DIP packages, you can build your
own programmer, and the basic development tools are free.
None of those things are true of the MSP430, though I'd readily
admit that the MSP430 is a much nicer device in almost all
respects.

I don't agree on this point. Development tools are available for free
(GCC). A programmer may consist of just a RS232 converter or a Serial to
USB bridge (like the CP2102 from Silabs) and off you go. How much easier
can it be? It does take some experience to solder the devices onto a board
though, but it is doable.

Nico Coesel



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to