EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Microcontroller Family Selection Guide

Started by Eric November 5, 2007
I wrote up some of my thoughts about various microcontroller families.
My intent is to mostly to help newbies and students decide what type
of microcontrollers to start with.

http://www.ericengler.com/downloads/microcontroller%20family%20selection%20guide.pdf

Feel free to correct any possible errors, but I have a right to keep
my opinions unless you can change them by presenting new information.

There are many families I have never tried so I did not try to comment
on them.

I want to follow this up with another document that points out some
good developer boards, ISP programmers, and JTAG debuggers for the
various families.

Eric

Eric wrote:
> I wrote up some of my thoughts about various microcontroller families. > My intent is to mostly to help newbies and students decide what type > of microcontrollers to start with. > > http://www.ericengler.com/downloads/microcontroller%20family%20selection%20guide.pdf > > Feel free to correct any possible errors, but I have a right to keep > my opinions unless you can change them by presenting new information. > > There are many families I have never tried so I did not try to comment > on them. > > I want to follow this up with another document that points out some > good developer boards, ISP programmers, and JTAG debuggers for the > various families. > > Eric
Since you asked:
> came out while I was attending college in 1981. Revolutionary use of a barrel > shifter that can rotate a byte any number of bits in a single machine cycle (which required > 12 clocks).
Err ?!? - Do you have any opcode examples of this feature ?
> It can also directly address bits from a large pool of bytes which they call bit > addressability.
It also has atomic boolean opcodes, and the Bit Addressable space is split 50:50 to SFR space, and RAM data Space. With a language that supports named Boolean variables, this makes for very compact, and readable control code.
> These devices have a limited internal architecture that makes them > unsuitable for use with C compilers.
Incorrect. There are many C compilers that prove this to be false. Perhaps you meant to say the core was designed before C was ever comtemplated on uC, so more effort is needed to create a usable compiler for the 80C51. There are also other languages, like Basic, Pascal and Modula-2 for the C51 core. PL/M was an early language, that showed what could be done, and a BASIC52 was also very early.
> These are a Harvard family that pre-dated the usage > of the word Harvard. The address model is highly segmented resulting in a lot of > inefficient paging.
Err?!? There is no paging in C51's - you are thinking of PICs (or 8048?) ? The 80C51 has variable length opcodes, and these give tight code. eg Appx speaking, these can access ACC or Registers in 1 byte, direct memory in 2 bytes and XDATA in 3 bytes.
> The lack of any memory-to-memory operations also cause all the data > to funnel through a hotly contested set of registers.
Not correct. There is Move Dir,Dir, and DJNZ Dir, (& others) and the Boolean opcodes mean you CAN write workable interrupt routines that do not use any registers. The 80C51 has MUCH better Memory-Memory opcode access, than an AVR, or PIC. The only device ahead, on Memory-Memory opcodes, would be the Intel 196, and the Zilog Z8 or Infineon XC166 both have register-frame control, that emulates memory-memory, but with the wider opcodes of reg-reg access.
> Nonetheless, there are some compelling 8051 devices in today�s market,
Correct. It is the most sourced core on the planet. [Microchip volumes are climbing, but that is spread over MANY cores - PIC is a brand, _not_ a Core]
> such as the SiLabs controllers that have > many instructions that can execute in a single clock cycle and have great peripherals such > as A/D, USB, and Ethernet.
Nearly, SiLabs have not released Ethernet C51's yet, but others have.
> Silabs also has parts that go up to 100 Mhz speed, and this > figure is over the whole temperature range. Even more impressive is that they don�t play > games with the A/D specs � they specify the results while the CPU core is running full > speed and over the whole temperature range. Many other vendors specify the A/D > performance while the CPU core is in a sleep mode to minimize CPU noise from > affecting the A/D performance.
correct. SiLabs offer 12/16/24 bit ADCs, and if tou want HighEnd ADCs, you will likely buy a C51 from Silabs, ADi, BurrBrown (TI), TDK etc
> Royalty-free (but closed source) protocol stacks are > common in the SiLabs world. Atmel and NXP also have some modern 8051s. Keep in > mind, though, that many vendors strive to reduce the cost of these devices for use in high > volume applications, so their performance is not always state-of-the-art. Although some > vendors may still make 8051�s in prototype-friendly DIP packages, this is not the norm. > There is no gcc compiler but there is a free SDCC compiler.
Other cores:
> RS08 � the weakest 8-bit line in existence, and a terrifically good example of how NOT > to implement a Harvard architecture.
Err, no, I'd call the RS08 well designed, and a good example of "throw everything overboard, until the compiler stops working" It is a minimalist core. ( Like the 80C51, it has variabe length opcodes for good code density.)
> The focus on this family is extreme low cost single > function applications such as disposable consumer items, or vibrating toothbrushes. > When you need the absolute lowest cost and your processing needs are very meager, this > might be your ticket. I would not call this a general purpose processor family. This is > little more than a programmable 555 timer replacement, but there are better choices even > for that role. The only time these make sense is in multi-millions of units of production > where the absolute lowest cost per part is critical.
Err ?. The RS08 has some unique and pioneering new features, besides the core : It has a wide-supply range, thanks to a clever sub-uA OnChip regulator and a VERY LOW current (< 1uA) timer mode, as well as Analog Comparitor, and Low Voltage Detector, and an On Chip OSC. If you think there are better Smart 555 class choices, I'd like to know what they are! On-Chip regulators are an emerging technology. (The newest SiLabs and Infineon etc device do this too). It provides a good way to make a truly wide-usage device, that has a Shrink-process core for low cost, and low EMC footprint. The RS08 is stocked by many catalogue companies, and prices are easily under 50c in smallish volumes. So that's NOT a 'high volume only' device. MSP430:
> Although some > competing devices have low sleep currents, and some have low active currents, this > family has low current in both categories.
Yes, but the MSP430 lacks a Low power Cal On-Chip OSC. You have to use the 32KHz Crystal option, which gives HIGH precision, but has cost and vibration impacts.
> Further, it has the fastest wake-up time, going > from sleep to full speed in less than 7 microseconds. This fast wake-up time allows them > to minimize power loss during the start-up period that otherwise wastes a lot of power in > competing chips because they wait for the crystal oscillator to stabilize before completing > the wake-up cycle.
Other devices with OnChip OSC have fast wakeups, the newest Silabs devices wake up in well under 1uS! The Newest Silabs devices have uA comparitors, and Low icc precison on-Chip trimable oscillators - which opens up lower power RUN than MSP430, if you do not need crystal accuracy. (If you do, then the SiLabs devices also have 32Khz Xtal osc ability, and performance are more comparable.) Coldfire: Freescale have just released Coldfire V1 core variants, and have (IIRC) a Free compiler up to 128K in Size. The Code fire V1 targets easy Migration from 8 Bit cores. For learning : SiLabs have an expanding range of impressive, Low cost Eval Stick level products. These all have USB debug access. Other recent cores of interest: On the fringes, Korean Coreriver have just released a new 4 bit '80c51 subset' variant GC89C510A0. ASM only. Precise on chip Osc, no timers, or INTs, and targeting toys & remote controls. FLASH models under US30c -jg
I could swear that the 8051 had a barrel shifter, but maybe it was one
of the variants that had that feature and I just assumed it was part
of the original 8051.

The 8051 memory paging I was referring to should have been named
differently to avoid confusion. I had in mind the bottleneck of using
DPTR to reference memory and the fact that most instructions do not
have the ability to reference "external" memory. That's not really
paging...it's worse in my mind.

There are msp430 devices with 2% accuracy in the internal osc.

The RS08 can not be cost effective for low volume applications because
it can't be used in a lot of different applications. In most real
devices you'll need more horsepower. Their are a number of consumer
applications where it will shine, but only if the volume is high
enough to justify retooling for that chip. An ATTINY or a small PIC
has a lot more flexibility and the tooling cost can be amortized out
over many applications. The software tooling cost of an ATTINY is also
cheap due to gcc. Only very specialized compilers can generate
efficient C code for the RS08, and I can't imagine writing assembler
code for it (I know some of you can do it well and my hat is
definitely off to you).

I really like the Coldfire architecture and I hope it catches on in
the GP market. Freescale has had a lot of marketing problems and I
hope they get over them. But unfortunately, they sat on their butt and
watched Arm eat away at their market share. By the time they woke up
they ended up far behind. This new V1 thing seems like a good idea,
but is probably a few years late in coming.

I'll make some changes to the document to fix the errors with 8051
info. and maybe to clarify some other points. If anyone else sees
issues, please let me know.

Eric

Eric,

Some factual corrections and comments.

8051 These are a Harvard family that pre-dated the usage of the word Harvard.

         I thought that the term Harvard Architecture came from Harvard Mark I
         developed during the second world war 1944 or so.

8051 I don't know any versions of the 8051 that has a barrel shifter for multiple
         bit shifts

8051 Has a complete instruction set, many C compilers have been successfully
         written for it.


PIC 8-bit (12F, 16F, 18F) Very successfully used for the applications that it
       was intended. The Stamp serial memory example shows its flexibility
       to execute an interpreted language.

       " extremely limited hardware stack that makes them especially unsuitable
         for use with C compilers."

      Stack size does not prevent C from being implemented on the architecture
      there are several good C compilers for the Microchip PIC families of
      parts including ours.



"RS08 &#4294967295; the weakest 8-bit line in existence, and a terrifically good example
      of how NOT to implement a Harvard architecture."

     The RS08 is a von Neumann architecture part not Harvard.

     The RS08 is a very well implemented minimalist processor with a
     diverse application possibilities. The RS08 is sub $1.00  part with
     background mode debugging BDM on chip and a surprisingly
     powerful instruction set.

     Benchmarks on our C6808 compiler tools show that code generated for
     the RS08 is between 10 and 15% larger than the same applications on
     68hc08 and S08 parts. Most of the difference is lack of hardware
     multiply and divide.



General comment about C compilers. All of the architectures reviewed have
good C compilers available. You may be doing yourself a disservice by
limiting yourself to no cost tools. The typical commercial C compiler
supporting this class of processors costs between 2 and 3 man days. If
it saves that much development costs it should be considered.


Regards

 --
 Walter Banks
 Byte Craft Limited
 Tel. (519) 888-6911
 Fax (519) 746 6751
 http://www.bytecraft.com
 walter@bytecraft.com




Eric wrote:

> I wrote up some of my thoughts about various microcontroller families. > My intent is to mostly to help newbies and students decide what type > of microcontrollers to start with. > > http://www.ericengler.com/downloads/microcontroller%20family%20selection%20guide.pdf > > Feel free to correct any possible errors, but I have a right to keep > my opinions unless you can change them by presenting new information. > > There are many families I have never tried so I did not try to comment > on them. > > I want to follow this up with another document that points out some > good developer boards, ISP programmers, and JTAG debuggers for the > various families. > > Eric

Eric wrote:

> The RS08 can not be cost effective for low volume applications because > it can't be used in a lot of different applications. In most real > devices you'll need more horsepower.
This has not been my experience with the RS08. This part has a surprising amount of processing power.
> The software tooling cost of an ATTINY is also cheap due to gcc.
> Only very specialized compilers can generate > efficient C code for the RS08, and I can't imagine writing assembler > code for it
I wrote the code generator for a RS08 C compiler. The instruction set is orthogonal and complete. There were no specifically difficult parts in the RS08 compiler implementation At the assembly level it is very similar to many of freescales offerings including others in your review. RS08 C compiler overview http://www.bytecraft.com/downloads/rs08adv.pdf Regards -- Walter Banks Byte Craft Limited Tel. (519) 888-6911 Fax (519) 746 6751 http://www.bytecraft.com walter@bytecraft.com
"Eric" <englere_geo@yahoo.com> wrote in message 
news:1194242160.870442.15090@19g2000hsx.googlegroups.com...
>I wrote up some of my thoughts about various microcontroller families. > My intent is to mostly to help newbies and students decide what type > of microcontrollers to start with. > > http://www.ericengler.com/downloads/microcontroller%20family%20selection%20guide.pdf > > Feel free to correct any possible errors, but I have a right to keep > my opinions unless you can change them by presenting new information. > > There are many families I have never tried so I did not try to comment > on them. > > I want to follow this up with another document that points out some > good developer boards, ISP programmers, and JTAG debuggers for the > various families. > > Eric
What about the PIC32? You seem to have missed it off :o) -- Regards, Richard. + http://www.FreeRTOS.org 14 official architecture ports, 1000 downloads per week. + http://www.SafeRTOS.com Certified by T&#4294967295;V as meeting the requirements for safety related systems.
On Nov 5, 12:56 am, Eric <englere_...@yahoo.com> wrote:
> I wrote up some of my thoughts about various microcontroller families. > My intent is to mostly to help newbies and students decide what type > of microcontrollers to start with. > > http://www.ericengler.com/downloads/microcontroller%20family%20select... > > Feel free to correct any possible errors, but I have a right to keep > my opinions unless you can change them by presenting new information. > > There are many families I have never tried so I did not try to comment > on them. > > I want to follow this up with another document that points out some > good developer boards, ISP programmers, and JTAG debuggers for the > various families. > > Eric
Nice job, your always going to get complains when you hit a nerve of someone's "love child" anyway, newbies typical uses small processors to do floating point, so here is a modified list I posted a while back to give newbies a ballpark estimate what they can expect MPS430, 32 bit floats, imagecraft complier, typical cycles add 158 sub 184 mul 332 div 620 ARM, keil complier 32 bit floats, typical cycles add 53 sub 53 mul 48 div 224 sqrt 439 log 435 ARM, GNU complier 3.3.1 32 bit floats, typical cycles add 472 sub 478 mul 439 div 652 sqrt 2387 log 13,523 ARM, GNU complier 3.4.3 32 bit floats add 73 sub 74 mul 49 div 142 8051, keil complier, 32 bit floats, typical cycles add 199 sub 201 mul 219 div 895 sqrt 1117 log 2006 AVR, IAR complier, 32 bit floats add 173 sub 176 mul 175 div 694 sqrt 2586 log 3255 max cycles up to 2x typical
You've skipped the entire R8C/M16C/M32C family from Renesas,
which is 16 bit, ranging from 20 pin to 144 pin packages, 4K to 1M
flash, lots of peripherals, both free and non-free dev tools, and easy
to program in-circuit.

http://america.renesas.com/fmwk.jsp?cnt=m16c_family_landing.jsp&fp=/products/mpumcu/m16c_family/

They're stack-oriented CISC (i386 developers will find them
"comfortable" as the addressing modes and register sets are similarly
designed).  The larger chips have externally-accessible data/address
busses for expansion; I have one board on my desk with 4Mb of external
RAM and a CP2200 ethernet port.  Speed range is 16-32 MHz; most chips
run on 3.3 or 5v (the bigger ones can be split - half the pins run on
one voltage, the rest on the other).

The only drawback from a "beginner" point of view is that they're not
available in common 0.1" DIP packages, although you can get plans for
adapters for the small ones.
"Eric" <englere_geo@yahoo.com> skrev i meddelandet 
news:1194242160.870442.15090@19g2000hsx.googlegroups.com...
>I wrote up some of my thoughts about various microcontroller families. > My intent is to mostly to help newbies and students decide what type > of microcontrollers to start with. > > http://www.ericengler.com/downloads/microcontroller%20family%20selection%20guide.pdf > > Feel free to correct any possible errors, but I have a right to keep > my opinions unless you can change them by presenting new information. > > There are many families I have never tried so I did not try to comment > on them. > > I want to follow this up with another document that points out some > good developer boards, ISP programmers, and JTAG debuggers for the > various families. > > Eric >
Why not create a Wiki instead? -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
Eric wrote:
> I could swear that the 8051 had a barrel shifter, but maybe it was one > of the variants that had that feature and I just assumed it was part > of the original 8051. > > The 8051 memory paging I was referring to should have been named > differently to avoid confusion. I had in mind the bottleneck of using > DPTR to reference memory and the fact that most instructions do not > have the ability to reference "external" memory. That's not really > paging...it's worse in my mind.
That's an opcode reach threshold issue, and every device have those. In the 80C51 you have 128+128 bytes of DATA memory, which can be accessed & also INC/DEC/DJNZ/AND/OR etc _without_ consuming a register pointer. In this memory, the 80C51 is _more_ code efficent than a core like the AVR, where ALL Data memory goes via some pointer, or offset pointer. A better idea on a uC register ('RISC') core, is a register frame pointer a la C166, and z8. The AVR started life as a RISC IP block, so that was not on their radar. XDATA is Microcontroller optional, and so has less access opcodes. Many newer C51's have multiple DPTR sets, which eases the bottleneck.
> > There are msp430 devices with 2% accuracy in the internal osc.
It is not the precision, it is the absence of Low Power on Chip OSC. We have an app right now, where we cannot afford a 32Khz Xtal, and do not need high precision. That's actually not easy to resolve. eg AVR P versions OnChip LF OSC, consumes a large 100-220uA. Best are newest Silabs devices at 5.5uA and some WDOG Osc, at 1-2uA, but most WDOG osc are very poor in Precison AND trim. There is a definite Icc/Precision trade off. Ideal would be a RS08 with more pins, but that's not around yet...
> > The RS08 can not be cost effective for low volume applications because > it can't be used in a lot of different applications.
That does not quite make sense - did you mean tiny (hobby) volumes, where the chip price is immaterial. There you certainly should overshoot the core, as it saves time. Low volume can be up to 10,000 in many chip vendors terms. In most real
> devices you'll need more horsepower. Their are a number of consumer > applications where it will shine, but only if the volume is high > enough to justify retooling for that chip. An ATTINY or a small PIC > has a lot more flexibility and the tooling cost can be amortized out > over many applications. The software tooling cost of an ATTINY is also > cheap due to gcc. Only very specialized compilers can generate > efficient C code for the RS08, and I can't imagine writing assembler > code for it (I know some of you can do it well and my hat is > definitely off to you).
Freescale have a free compiler, for this ?
> > I really like the Coldfire architecture and I hope it catches on in > the GP market. Freescale has had a lot of marketing problems and I > hope they get over them. But unfortunately, they sat on their butt and > watched Arm eat away at their market share. By the time they woke up > they ended up far behind. This new V1 thing seems like a good idea, > but is probably a few years late in coming. > > I'll make some changes to the document to fix the errors with 8051 > info. and maybe to clarify some other points. If anyone else sees > issues, please let me know. > > Eric
-jg

The 2024 Embedded Online Conference