сряда, 30 юли 2008 г.

Microcontrollers... Which one?

Perhaps the most important components in every newer embedded design. Basically there's almost no device today that doesn't use a computer, to command it's inner workings. But a computer as we know it consist of a CPU, RAM, ROM and peripheral devices and embedding it in every design with all these individual components is too expensive, takes too much room and perhaps too much resources, i.e. a device may have 32k RAM but need only 1k. But not with MCUs (micro controller unit), which basically are the computers with all the components structured in a single chip, with resources limited to the needs of the design, and that's what makes them special - they're cheap, take less room and are more efficient. But the point of all this is not to repeat the same old definition of a MCU and tell you how important it is. The point is figuring out the right choice for a microcontroller. I'll start with the major companies that manufacture microcontrollers and make a comparison between them.
First things first, the PIC-micro(TM) MCU, designed and manufactured by Microchip. This was the choice that I made, as a beginner. What you have here is a not too complex MCU, which has everything to suite your needs. It doesn't cost much and is very easy to learn. So far Microchip designed 4 major types of microcontrollers suitable for every design: Baseline, Midrage, Highend and PIC18 series. All of these are 8-bit MCUs, with very easy assembly programming language instruction set. You can do almost everything with them, and are by far IMHO the MCU of choice by hobbyists like my self and beginners. The PIC24, dsPIC(16 bit) and PIC32(32-bit), also designed and manufactured by Microchip, are not any different than the 8-bit ones. They too are cheap and simple to use (we exclude PIC32 since it has a completely different instruction set, i.e. MIPS16/32 and is mainly programmed with ANSI C), but are designed for more complex designs. For now, I won't talk about this type of MCUs, only 8-bit ones.
The other major company is Atmel. TBH, I never actually used any of their controllers, they don't even sell them at most of the electronic component shops here., but from what I've heard, they're not as cheap and easy to use as the PIC, rather more efficient and reliable. Their most famous 8-bit MCUs are the ATMega(TM) and the AVR(TM).
The third company is Intel, which designed the 8051 microcontroller. I never heard of them designing any further MCUs than that, but Siemens started their own development of MCUs, based on this very controller, as well as Cypress, Atmel, Texas Instruments, etc. Most of these microcontrollers, don't have internal RAM/ROM, and instead require you to connect one externally, thus giving you the power to add whatever you need for your design. These MCUs are not suitable for simple designs. They're good for experiments though.
A very interesting type, designed by Parallax is the BASIC Stamp. It is based on the PIC MCU, in fact it's not exactly a microcontroller, rather a small PCB with some external components - PSU (power supply unit), serial EEPROM and a clock. There's also a BASIC interpreter programmed inside the PIC. This makes it the excellent choice for experimenting, but is useless for embedded design. I never actually needed this one though, since I'm not a particular fan of BASIC.
And last but not least - the PICAXE. Based on the PIC MCU, this microcontroller has a similar structure as the PIC, but is more beginner/hobbyist friendly. I never used them, since they're not available here.
From all of this, we can make this conclusion - If you're a beginner or you like designing simple things - you should use the PIC. If you're more advanced and want your design to function correctly, AVRs and ATMega are the MCUs for you. And if you like complex stuff - try the 8051.
There are dozens of MCU types out there though that I don't even know about, each with it's own uniqueness, advantages and disadvantages, but for now, I'll just stick to these.
Anyways, feel free to comment and correct me.

Intro

Hello,
I'm Victorio El Hakim, and I wish to welcome you all to my blog, where I'll post all kinds of ideas, projects, videos and perhaps even tutorials that I come up with about embedded design! Most of the times, posts will be structured in a report or analysis of my works or works of particular people that I find intriguing. I have to note that I'm still learning electronics, but I'm very adept at programming, particularly C/C++. So the sole purpose of this blog is not so much to show off with my knowledge of digital electronics or "skills", as some might like to put it, but rather for everyone (mostly me) to learn. So I expect people to be leaving comments, suggestions, feedback and most of all corrections about my ideas. I also have to note that I'm still a student, and for now electronics is mostly like a hobby to me, but I plan to start learning it seriously in the future. So, again I wish to welcome each and every last one of you to my blog and I hope you'll enjoy your stay.
~Victor