On 15/04/12 17:29, Anonymous wrote:
> "MK"<> wrote in message
> news:...
>> On 14/04/2012 23:12, Anonymous Remailer (austria) wrote:
>>> The NXP LPC1110 starts at less than $1 for a 4KB flash part. That's
>>> cheaper than an AVR in my experience! I'm not really sure if it's all
>>> that more powerful but it's good enough for me. The thing I like is
>>> that it also has a single I/O line debugging, just like AVR's
>>> DebugWire, which isn't available on all parts and for which you need
> to
>>> purchase ATMEL's programmer since no one else has (AFAIK) implemented
>>> it.
>>>
>>> Anyone have any experience with Cortex-M0 yet?
>>>
>> We used the M0 on it's own to replace a PIC and the contrast in terms of
>> speed of development was enormous. The PIC was cheaper but nothing like
>> enough to make up the increased cost of development for a job with a max
>> production run of 1000.
>>
>
> Why was the development so much more speedy / cheaper with Cortex M0?
> You didn't need to optimize the code so much because the thing has so
> much more speed?
>
When you use a small micro, you have to limit your coding style
somewhat. Code that uses multiple pointers or indirect functions will
compile on a decent C compiler even for brain-dead processors like the
PIC (assuming 8-bit PICs here), but it will run like a lame sloth. When
you have a processor with a single linear address space and solid
pointer support, such as ARM, MIPS, PPC, m68K or msp430 (even though it
is only 16-bit), you are much freer in the structures you can use in the
program. If an array of structs is appropriate, use it. If callbacks
are the best way to organise the code, use them. But on a PIC they
would be hideously slow, so you find other ways to code your program.
|