Author Topic: If someone wouldn't mind taking a moment [microcontroller vs. microprocessor]  (Read 11566 times)

0 Members and 1 Guest are viewing this topic.

Offline 8086Topic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: gb
    • Circuitology - Electronics Assembly
I'm having an argument with someone on a different forum about what a microcontroller is, and what a microprocessor is.

Could somebody please give a quick (couple of lines is all I need) definition of a microcontroller and microprocessor?

I've already told them but they won't believe me. Need some backup!

Apologies for such a waste of time post.  :-[

Ta.
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
A microprocessor requires additional support peripherals, such as RAM, program storage, etc.  A microcontroller has everything in one unit.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27913
  • Country: nl
    • NCT Developments
microcontroller = cpu + one or more I/O related peripherals in/on one chip
microprocessor = a cpu in/on one chip
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
A microprocessor is just a single IC that contains at least the full complement or parts to implement the CPU (central processor unit) of a computer. Prior to microprocessors, computers had to be made from discreet transistors, then standard logic IC's and then there were IC's that contained a portion of a CPU. The early microprocessor IC's like the Intel 4004 and the 8008 were a massive leap forward as they replaced a massive PCB (or many PCB's) with a single chip.

A microcontroller is probably a microprocessor designed for embedded use. They now tend to include RAM, ROM, A/D converters. EEPROM, etc but I think the 8032 (the Intel 8051 with external EEPROM and RAM) can still be termed a microcontroller.

It would be possible to make a PC with a part labelled as a microcontroller by the manufacturer, so I think the term "microcontroller" can be used either as a term describing the intention of usage by the manufacturer, or the actual usage of the part in a final circuit.

I think if a Pentium4 IC was used as a dedicated embedded processor, it would be OK to describe it as a microcontroller.  Microcontrollers are microprocessors.

Richard.

 

Offline 8086Topic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: gb
    • Circuitology - Electronics Assembly
Thanks guys, much appreciated.   :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
A pentium IV cannot be classified as a microcontroller, even if used in an embedded system !

The distinction lies in the fact that a microcontroller integrates other system parts besides the processing core. The pentium is still only a processing core.

A microcontroller includes things like uarts or other communication interfaces, gpio's , timers, counters and sometimes even ram and rom.
So yes the 8032 , although romless , is still classified as microcontroller as it has a uart, gpio ports , timers , interrupt controller and some ram.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
A pentium IV cannot be classified as a microcontroller, even if used in an embedded system !

The distinction lies in the fact that a microcontroller integrates other system parts besides the processing core. The pentium is still only a processing core.

A microcontroller includes things like uarts or other communication interfaces, gpio's , timers, counters and sometimes even ram and rom.
So yes the 8032 , although romless , is still classified as microcontroller as it has a uart, gpio ports , timers , interrupt controller and some ram.
I understand your argument, but it just doesn't stand up. All modern computer CPU's chip contain a mass of perihperal hardware now. If you can find a modern Computer processor IC that contains no peripheral hardware, I would be amazed. Only a tiny fraction of modern CPU chips is the actual CPU unit.

I was thinking that perhaps a microcontroller needs bit commands and/or single bit port input/outputs, then again this is not completely true. A tiny 4 pin package containing nothing else but an I2C bus and a RISC instruction set devoid of bit commands would still be very much a microcontroller.

If you replaced this single 4 pin chip with a modern computer processor chip with its external RAM, ROM etc, but all you actually used was the chip's I2C bus to control the same peripherals that the 4 pin chip was controlling, is would be hard to argue that is wasn't a microcontroller in its current usage.

I think "microcontroller" would have to be more a vague description of intent, rather then a term with any precise definition. Changes in technology will keep sliding the definition.

It is likely that in the future, both computer processors and microcontrollers may be available connect to the world via  a single serial super-fast optical link and in this case, it would come down to the intent of usage that would make the microcontroller a microcontroller.

Richard.
« Last Edit: May 13, 2012, 03:29:43 am by amspire »
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12368
  • Country: us
Similar to what Richard said, what about the "system on a chip" designs found in smart phones like the iPhone? They are cramming almost everything they can onto the same die to reduce the part count and improve the integration between components. Basically building the PCB on silicon. Is an SoC then a microcontroller?
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
no, an SoC is NOT a microcontroller ! an SoC is an SoC ...
Once you start slapping on graphical LCD controllers, USB , Ethernet it is becomes SoC. The line microcontroller <> soc is vague but typically the SoC have much more stuff on board than a microcontroller.

Modern Computer processor without hardware . Any intel or AMD processor. I860 I960 processors. they may have an on board memory controller these days and the io may be going over pxi express but they still need a bunch of support chips... without the support chps they do zilch ....

as for a microcontroller : all that needs is a crystal (and even that is built in sometimes .. )

For me a microcontroller is a processor that does some 'behind-the-scenes' work and, is not really visible to the user, and is programmed for a specific task that cannot be altered by the user. so the microcontroller in a microwave oven control panel fits that description : you can't change it...
in a robot arm .ditto.

in a cell phone it is not  microcontroller as the user can install apps and run programs of his choice.
in a microcontroller the code is static.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
How about: A microprocessor is a Ferrari engine, and a microcontroller is an entire Yugo automobile. :)
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
that would be acceptable :). however there are 'microcontrollers' out there that actually have a pretty souped up 'engine'.
but you are right.

a microprocessor is just the 'engine'
a microcontroller ranges from a yugo to a lexus. swift nimble and it gets you there.
an SOc would be a rolls royce / bentley / aston martin  ... big , heavy , and lots of power.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Microprocessors are processors because they process information and don't have a need for much code to do anything other then process information

Microcontrollers on the other hand control I/O directly, most chipsets falls into this category because chipsets(or rather southbridges and northbridges but recently northbridges are integrated into the CPU) talk to the CPU and has the peripherals like a MCU but they are DESIGNED for that peripheral.

As for normal MCU's like a STM32F4 it's easy to describe them as a BWM M3
A Cortex M4 has like 1.25DMIPS/MHz

The thing about MCU's are that they process code and information AND control I/O's
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38612
  • Country: au
    • EEVblog
A microcontroller can execute a usable program without any support chips.
i.e. it has the usable program memory/flash inside to do that.
Note that mask ROMed microprocessors were never considered microcontrollers.
The later addition of various internal peripherals helped differentiate the microcontroller from the microprocessor, but they aren't strictly necessary.

Dave.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
so... a PC is a "macrocontroller" and it has a microprocessor in it. ok!
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27913
  • Country: nl
    • NCT Developments
microcontroller = cpu + one or more I/O related peripherals in/on one chip
microprocessor = a cpu in/on one chip
Lets  pull in SoC as well:
SoC= cpu + peripherals which can run Linux
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline caroper

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
These days a Microprocessor could just be software.
It is a computing core without peripherals.
You can buy or write Code to embed a Microprocessor into an FPGA along with whatever other peripherals you require.
Is the resulting FPGA then a MicroController :)


The advances in technology have blurred the old distinctions.




Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
A microcontroller can execute a usable program without any support chips.
i.e. it has the usable program memory/flash inside to do that.
Note that mask ROMed microprocessors were never considered
That is probably the modern usage, but Intel datasheets always described all the 8051/8032 family of chips as microcontrollers, and not microprocessors. This includes the masked ROM versions, and the external ram and ROM versions with a full data/address bus.

The 8032 cannot execute anything without an external ROM, but Intel still say it is a microcontroller.

Richard.
« Last Edit: May 13, 2012, 02:45:02 pm by amspire »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
[Lets  pull in SoC as well:
SoC= cpu + peripherals which can run Linux
or Symbian , or PalmOS , or windows mobile , or Psos or Vxworks or iRMX. Soc are not restricted to linux ... linux is only small fry ...

@eevblog :
Quote
A microcontroller can execute a usable program without any support chips.
i.e. it has the usable program memory/flash inside to do that.
Note that mask ROMed microprocessors were never considered microcontrollers.

no microprocessor has rom on board ... if its got rom on board its a microcontroller. ( microcode does not count in this instance )
MAsk rommed microporcessors are microcontrollers.

Nayway this discussion is moot. Only intels definition is valid as they coined the word 'microcontroller'.
The first microcontroller was the TI TMS1000 , followed by intels MCS48 family. TI did not use the word 'microcontroller' they called it 'computer on a chip' (they own the patent on the consept )
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27913
  • Country: nl
    • NCT Developments
[Lets  pull in SoC as well:
SoC= cpu + peripherals which can run Linux
or Symbian , or PalmOS , or windows mobile , or Psos or Vxworks or iRMX. Soc are not restricted to linux ... linux is only small fry ...
Linux doesn't exclude any other OS. Its just to mark the capabilities like having lots of memory, a decent CPU and a MMU. I wouldn't call Linux 'small fry' either. All Android based smartphones run on Linux. If you look for a SoC the best supported platform by most vendors is Linux. They would not do that if most SoC based designs where not running on Linux. If you look close enough you'll find that most people from the civilized world have (on average) at least one Linux based system in their home.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
i got about 6 linux systems at home :) , mainly NAS devices and a couple of android tablets.

But on all the embedded SOC based stuff in operation today ( excluding tablet/smartphones : that is not 'embedded stuff' ) linux is only a small group. Lots of industrial applications run on pSos, Nucleus or VxWorks. Linux is good if you need a full peripheral set like displays and user interfaces. Then the development cycle becomes short. For other embedded applications vanilla linux is a bit of a resource hog .
There are heavily optimized linux versions that can be statically compiled for embedded stuff like Montavista Linux, but that stuff is not 'free' as in -gratis- ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
I know somebody will definitely pop in and say iOS isn't linux and Android is just a mere copy.
AS IF!
You don't know anything if you say that! iOS is based on linux and is terribly inefficient when it comes to being linux and as well, same goes for the desktop os'es
they are all crappy compared to the free and real deal
 

Offline baljemmett

  • Supporter
  • ****
  • Posts: 665
  • Country: gb
You don't know anything if you say that! iOS is based on linux and is terribly inefficient when it comes to being linux and as well, same goes for the desktop os'es

The phrase 'physician, heal yourself' springs to mind!  iOS, like OS X, is based on the Mach kernel with chunks of FreeBSD userland etc. (a combination known as Darwin); it most certainly is not derived from Linux.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
You don't know anything if you say that! iOS is based on linux and is terribly inefficient when it comes to being linux and as well, same goes for the desktop os'es

The phrase 'physician, heal yourself' springs to mind!  iOS, like OS X, is based on the Mach kernel with chunks of FreeBSD userland etc. (a combination known as Darwin); it most certainly is not derived from Linux.

Alright, it's unix. Still a BAD version of unix.
 

Offline A-sic Enginerd

  • Regular Contributor
  • *
  • Posts: 144
I think some of the confusion may stem from where the terms originated, to what we now have today which has begun to blur some of the lines.

As stated, original definitions were things like:
microprocessor - is just the CPU. Useless on its own
microcontroller - cpu with all the required support to make it useful (some rom, ram, I/O's of various flavors, etc.). Typically the CPU has much less horsepower than its contemporary "microprocessor" cousins.
SOC - I'll get to that in a minute......esp since it's a comparatively new term.

I think now days, one may also need to consider the applications of said devices to help clarify the definition. (as I'm saying this through gritting teeth because I KNOW someone will argue this point. Yeah.....whatever. It's here to help illustrate my point)

Now, to take the one argument that some of the latest "CPU's" from Intel include a lot of that said stuff...I would agree is starting to blur that line. However, can these same processors run / work completely on their own? (asking because I honestly don't know. I've got better things to do with my time than tract the latest offerings from Int-hell). I suspect they may not. I suspect there isn't any on board flash / rom and if there is any RAM it's not enough to make it useful. If my suspicions are wrong, then yeah, I guess in the strictest sense one could technically call it a "microcontroller". 

However, I think when you look at how / where they're put into application you begin to see the real difference. These "microprocessors" are pretty much always used in something that makes up some flavor of a mainstream PC / Server sort of thing. And yes, I'll even toss in things like DVR's into this realm since really all a DVR is, is a PC with a dedicated purpose.

Now on the flip side, when looking at our microcontroller friends, they are pretty much always used in small, specialized, embedded systems type applications. You don't find anyone trying to make a general purpose PC out of a microcontroller. Now having said that, do you ever see a generic Intel / AMD "microprocessor" used in a small, dedicated embedded system? Sure you do. But as I mentioned, the application of said devices only helps clarify its definition...it doesn't dictate it.

So where do SOC's fit in? Well, you have to look at their origins. They come about as a result of ASICs. Again, in the strictest sense could they be defined as a "microcontroller"? Most of the time, probably so (would need to evaluate them on a case by case basis). However, they often are built to serve a dedicated purpose and contain a lot of specialized blocks to fit their dedicated purpose. I've worked on SOCs that the only thing that chip knew how to do was act as a print server, or a storage network bridge, etc. Yes, that was in part due to the firmware / software written for it, but even if you tried to get it to do something else, it wouldn't be very good at it. The general architecture was tuned to facilitate that one specific application (as their roots "ASIC" defines).

So could you force feed a "generic" microcontroller to do what an SOC does? Possibly, but most likely you'll need lots of other supporting stuff and it wouldn't be very good at it. Example would be: when was the last time you saw a microcontroller with a serdes capable of supporting FC/SAS? Even if you could get all the hardware together it would have really poor performance. (one of the key architectural aspects of any SOC is its datapath. It has been optimized to move things around / through the various functional blocks as efficiently as possible).

Could you take a generic microprocessor and have it do what an SOC does? Sure, but it will require more additional hardware and wouldn't fit in your pocket as nicely as your cell phone. We won't even talk about battery life. ;)

The inverse of all these is also true when trying to get an SOC to fit the applications of the others.

I will agree there is beginning to be a convergence. Is it possible that some day we reach a point where you simply have a generic "compute core chip"? Possible.

Now just a footnote on the following reply:
These days a Microprocessor could just be software.
It is a computing core without peripherals.
No. For simulation purposes only. Any useful uP is/has physical hardware.

You can buy or write Code to embed a Microprocessor into an FPGA along with whatever other peripherals you require.
Is the resulting FPGA then a MicroController :)
No. If that's your thought process, then you don't have a real clear understanding of what's happening. The language you use is an HDL. By definition it is used to "create" hardware. You actually need to be thinking hardware when you write this code, because that's what it truly turns into. The microprocessors you're speaking of are what's known in the industry as a "soft core". It's called that because you're given the HDL code for it and it is left up to you to run it through the synthesizers, place / route, etc. to generate the hardware. If you put all the appropriate pieces together in an FPGA could it then be called a "microcontroller"? In the strictest sense - yes. Why? Because what is a microncontroller but simply a bunch of logic gates arranged to provide you a CPU and all the supporting infrastructure in a single package. The difference of having it done in an FPGA is simply that the FPGA can also be reconfigured to do other things. (there's also trade-offs with power, size, speed, etc., but we'll ignore those for this discussion)

The advances in technology have blurred the old distinctions.
Agreed. 100%. The lines are definitely getting more grey.

EDIT: almost forgot one last thing that sets SOCs apart from "microcontrollers". As most SOCs are based on ASIC processes, they often don't have on board flash. The fab process technologies really aren't compatible (at least enough to make it practical in most cases). So what does that mean? It means that SOCs almost always require an external ROM / FLASH part to get their code from.
« Last Edit: May 15, 2012, 07:24:15 pm by A-sic Enginerd »
The more you learn, the more you realize just how little you really know.

- college buddy and long time friend KernerD (aka: Dr. Pinhead)
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27913
  • Country: nl
    • NCT Developments
The advances in technology have blurred the old distinctions.
And made some dissapear like the term DSP. Nowadays generic microcontrollers are fast enough to do both I/O and complex signal processing. Some microcontrollers (like the ARM Cortex M4 based controllers) have a hardware FPU or are fast enough to do some FPU emulation without getting utterly useless.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf