Electronics > Microcontrollers

Switching to 32-bit MCU from 8-bit "by default"

(1/6) > >>

cyberfish:
I realized that in most of my projects that don't have an FPGA, I need some sort of a microcontroller.

In most of those situations, the MCU used doesn't really matter. It would just need to do some timing, and toggle some pins. Anything will work.

I have always been using AVRs and PICs for those. I have built perhaps 10-20 AVR/PIC-based projects, as that's what I go to "by default", if there are not really any requirements.

But more and more, I'm realizing that I'm just giving myself a hard time, compared to, for example, just using a Cortex-M3 based MCU.

My biggest complaint for 8-bit micros is the lack of (good) tools. PIC doesn't have good free development tools - MPLAB has restrictions for the free version (and doesn't run on Linux), and SDCC is just too buggy. AVR is a little better thanks to avr-gcc, but debugging requires very expensive tools, and only has primitive hardware support (correct me if I'm wrong, as I haven't been able to afford JTAG ICE). 8051 is in similar situation.

On the other hand, Cortex-M3 has many high quality open source tools - GCC, OpenOCD, GDB, Eclipse. Cheap JTAG programmer/debugger ($50 - just slightly more expensive than PICKit or AVRISP), and is available from quite a few manufacturers, so a lot more choices of compatible chips with different emphasis (speed, power consumption, size, etc).

Sure, for applications where you need 8-pin $0.50 micros, 8-bit ones are probably a better idea. But most of my projects are a LITTLE bigger than that. My by far most used AVR/PICs are in the $4-$5 range, and there are many Cortex-M3s in that range also.

So now I don't really see any reason why I shouldn't switch to 32-bit. Sure, I'll need to learn some new stuff, but it's new stuff I'll probably be using for a long time, so I don't mind that.

I know some people stick with 8-bit micros for 5V and DIP. That's the reason I chose to start with them as well (beside the fact that my school taught them first). Nowadays, though, all my projects are 3.3V, and all PICs/AVRs I use are TQFP anyways, so those things aren't really important any more. I make a lot of PCBs and I'm pretty good at soldering TQFP now. I can probably do them faster than DIPs (no huge pins to heat up).

The extra speed/functionality is just nice bonus. It makes my life a lot easier to stick with one architecture from the $2 range to $20 range.

What do you think?

Edit:
Using a 32-bit architecture also makes porting PC code easier, because many people assume int's are at least 32-bits when they program for PC. That means, things like compression or XML libraries can be easily ported over.

There's also no weird memory layouts to worry about. Everything is flat.

johnmx:

--- Quote from: cyberfish on June 11, 2011, 12:00:31 am ---PIC doesn't have good free development tools - MPLAB has restrictions for the free version (and doesn't run on Linux), and SDCC is just too buggy.

--- End quote ---
MPLAB is completely free, no restrictions at all.

In your specific case you should move to Cortex-M3.

slburris:
I'm 100% behind this.  I used to use various PICs and AVrs myself, but unless
I've got an application that really calls for a $0.50 - $2.00 micro, more and more
I'm using some flavor of TI (was Luminary Micro) Cortex M3. 

The cost difference is minimal now, and it's just silly to run out of flash or RAM
and have to quibble about a few bytes.  It'd nice to have some big boy features
like hardware division as well.

I know of people who go to the other extreme, like using a PC104 based PC to toggle
a signal line, but that's not a case of price parity, just not wanting to use unfamiliar stuff.

I've said it before in other parts of the forum, but for $12 you can put an ARM Cortex M3
and a Spartan 3A FPGA on a board, and with that combo, you can solve an awful lot of
problems without stressing out about it.  But that's just me.

Scott

EEVblog:
You just gave yourself every reason to use them, no one will call you a fool for doing so, all your points are valid for you. They may not however be valid for someone else.
These choices depend entirely on your own circumstances.

Dave.

cyberfish:
I guess what I'm really curious about, is why 8-bit MCUs are still so popular?

I totally agree that there's a market for it - the very low cost segment ($0.50-$1.50) and hobbyists, but they are very popular beyond those markets, too.

For example, this very popular PIC (18F4550) - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PIC18F4550-I/PT-ND

Digikey has almost 30000 of those. It's TQFP, so probably not for hobbyists. Besides, there is no way hobbyists can generate that kind of volume.

That means it must be used in some real products by engineers.

But we can easily find better, cheaper, faster 32-bit MCUs. Eg. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=497-10499-ND

So why are the expensive PICs still on the market? What can they do that ARMs can't? Well, except running at 5V. But how important is that? Especially in non-hobbyist markets?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version