What is a microcontroller? And how does it differ from a microprocessor?
Microcontrollers vs Microprocessors
A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals.
A microprocessor (sometimes abbreviated µP, uP or MPU) incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit (IC, or microchip).
Well, confused? In simple words, microcontroller is a full fledged PC in a single chip! On the other hand, microprocessor is the CPU of the PC in a single chip!
Okay, if someone asks you the configuration of your PC/laptop, how are you gonna tell them? Something like this (well, these are the configurations of my laptop… I know that it’s outdated and obsolete now, but it still serves my purpose ;) )
- Intel core2duo T6600 processor
- 2.2GHz processing speed
- 2 MB cache
- 320 GB 7200 rpm hard disk
- 4 GB DDR2 RAM
- 512 MB dedicated ATI graphics card
- 15” WLED screen with HD 720p resolution
- and other stuffs
So, these are configurations of a full fledged laptop/PC. Now, a MCU has all these things! Surprised? Well, you must be wondering that earlier I said that MCU is a single chip, but laptop is such a huge thing. It contains so many chips, so many devices, peripherals, etc. How can a MCU accommodate all these? Well, it has all these features, but on a lower/limited/restricted scale. Let’s take an Atmel ATMEGA32 MCU. It has the following specifications:
- 32 KB Flash memory
- 2 KB RAM
- 1 KB EEPROM
- 16MHz maximum speed
- 40 pin IC
- and many others that we will come across later
So, you see, a small IC can easily accommodate these features. You can consider microprocessor to be built up of separate units, but having higher resources.
In simplest terms,
MPU = CPU
MCU = MPU + Peripherals + Memory
Peripherals = Ports + Clock + Timers + UART/USART + ADC + DAC + LCD Drivers + Other Stuffs
Memory = Flash + SRAM + EPROM + EEPROM
(Don’t worry about these terms, we will discuss them when needed)
Since a PC has higher resources (from higher resources, I mean 4GHz processor instead of a 16MHz one, 4GB RAM instead of a 2KB RAM, etc), it is difficult to squeeze them into a single IC, thus we have separated units.
Thus it’s all about putting more in small space. As the technology gets improved, more stuffs can be squeezed into a single IC. It all depends upon the latest VLSI Design technology.
The following diagram explains it all!
Now you must be thinking that if a MCU is a PC, then why use use MPU? At this point, I would like to bring up the following point. A MCU is usually application specific or in other words, specific to applications that don’t require higher resources. For example, in a LED lighting system. Here, its absolutely worthless to implement a 2.2GHz core2duo processor, 320GB HDD, 4GB RAM, etc. A 16MHz single core processor, 16KB Flash, 1KB RAM, etc is more than enough for this application. So why waste money and resources on a MPU when we can manage it easily with a low cost MCU? But in case of a MPU, it can handle huge loads and features multitasking. You can play games in your PC, as well as browse the internet from the same PC.
Thus, we have discussed another important point that microcontrollers are usually designed to perform a small set of specific functions, for example as in the case of a Digital Signal Processor (like TMS320 by Texas Instruments) which performs a small set of signal processing functions, whereas microprocessors tend to be designed to perform a wider set of general purpose functions.
For those whom it might concern, the most MPUs are based upon von Neumann architecture (same memory is for both, program and data) whereas most MCUs are based upon Harvard architecture (separate memories for program and data). However, exceptions do exist!
Examples of MPU include the Intel processors (Pentium series, Dual Core, Core i7, etc), AMD processors, etc and examples of MCU include those made by Atmel (AVR), Microchip (PIC), Intel (8051), Texas Instruments (MSP430), etc.
Let’s have a look at few more microcontroller applications:
- alarm clocks, electric toothbrush
- microwave ovens, automatic electric heaters
- traffic signals
- phones and mobile phones
- automotive – lighting, braking, speed control
- harddisks, pendrives, printers, mouse, cameras, small electronic machines
- day to day applications like washing machines, photocoping machine, elevators, etc
- life saving equipments like pacemaker, etc
- and the list is endless!
Hence, we conclude that our world is too much wired, and too much full of microcontrollers! Try spending a day without microcontrollers… I bet you can’t! And if you do, kindly share your experiences with me ;)
And don’t forget to leave a reply below and tell me how did you like this article!
Summary
- MPU = CPU (single chip)
- MCU = MPU + Peripherals + Memory (single chip)
- MCUs are application specific whereas MPUs are designed for varied applications
- MPUs and MCUs have different architectures
- Life is incomplete without MCUs!
Published on June 5, 2011.
Last updated on June 5, 2011.
Last reviewed on December 18, 2014.
i just started, quite interesting.
Good! I’m sure you’ll love it! :)
If MPU is inside MCU how come you say that they have different architecture? I didnt get it.
MCU does computation. Computation requires a certain architecture.
MPU does processing. Processing requires a certain architecture different from that is required for computation. I.e. since computation and processing are different tasks, different architectures are required for each of them. That’s why MCU and MPU have different architectures though one is inside the other.
Nice nd easily understandable :-).which college year?
Thank you Anchal! Happy learning! :)
Nice stuff… thankx a lot. :)
very informative and basic, excellent. Thanks.
Thanks Syed. :)
good tutorial for beginners .. important points with much simplicity .. Good work ..
Thanks Akhil.
It is very good & useful article.. thanks
Thank you Pooja.
oh ho sir ji tu si te kamal kar ditta!
Very Nice stuffs!!!!handy for beginners!!! :)
Very pedagogic, fun to read and really makes me want to learn more! Thanks a lot!
Thanks for the feedback.
Keep Reading, Keep Sharing :D
very nice and freshers friendly stuff
Thanks Rakshit
Keep Reading, Keep Sharing ;)
Best basic of microcontroller that I ever read
Thanks! ;)
Keep Reading, Keep Sharing!
My doubts are clear now! Thanks…
Amazing! This article is vary easy to understand, and very beneficial for the beginners (y)
I have never understood the difference between mcu and mpu in a better way. Thanks man, you’re a saviour :)
Very informative article!
Since now we are 6 years later, and in another era in terms of integrated circuits technology, maybe new information can be added to the article, regarding SoC (system-on-a-chip), such as ARM used on mobile phones and tablets:
https://en.wikipedia.org/wiki/System_on_a_chip
“In contrast with a microcontroller, SoC integrates microcontroller (or microprocessor) with advanced peripherals like graphics processing unit (GPU), Wi-Fi module, or coprocessor.
One can say that the SoC is for microcontroller what microcontroller is for processors.”
interesting article .. you should mention that these advances in microcontrollers has lead to a new era which is called “The Internet of Things” … many thanks ;)
You made it seem very easy!
I’m telling you my lecturer took a whole semester of embedded class and 70% of the class still don’t understand this basic difference.