If someone wouldn't mind taking a moment [microcontroller vs. microprocessor] - Page 1
Forum section: electronics / general

author: 8086
author_rank: Super Contributor
timestamp: May 13, 2012, 01:22:58 am
content: 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.

author: MikeK
author_rank: Super Contributor
timestamp: May 13, 2012, 01:36:58 am
content: A microprocessor requires additional support peripherals, such as RAM, program storage, etc. A microcontroller has everything in one unit.

author: nctnico
author_rank: Super Contributor
timestamp: May 13, 2012, 01:38:02 am
content: microcontroller = cpu + one or more I/O related peripherals in/on one chipmicroprocessor = a cpu in/on one chip

author: amspire
author_rank: Super Contributor
timestamp: May 13, 2012, 01:42:24 am
content: 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.

author: 8086
author_rank: Super Contributor
timestamp: May 13, 2012, 01:55:08 am
content: Thanks guys, much appreciated.

author: free_electron
author_rank: Super Contributor
timestamp: May 13, 2012, 02:25:22 am
content: 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.

author: amspire
author_rank: Super Contributor
timestamp: May 13, 2012, 02:56:24 am
content: Quote from: free_electron on May 13, 2012, 02:25:22 amI 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.

author: IanB
author_rank: Super Contributor
timestamp: May 13, 2012, 04:33:05 am
content: 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?

author: free_electron
author_rank: Super Contributor
timestamp: May 13, 2012, 04:59:24 am
content: 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.

author: MikeK
author_rank: Super Contributor
timestamp: May 13, 2012, 05:00:16 am
content: How about: A microprocessor is a Ferrari engine, and a microcontroller is an entire Yugo automobile.

author: free_electron
author_rank: Super Contributor
timestamp: May 13, 2012, 05:28:42 am
content: 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.

author: T4P
author_rank: Super Contributor
timestamp: May 13, 2012, 08:24:04 am
content: Microprocessors are processors because they process information and don't have a need for much code to do anything other then process informationMicrocontrollers 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 aBWM M3A Cortex M4 has like 1.25DMIPS/MHzThe thing about MCU's are that they process code and information AND control I/O's

author: EEVblog
author_rank: Unknown
timestamp: May 13, 2012, 09:04:14 am
content: 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 13, 2012, 09:44:10 am
content: so... a PC is a "macrocontroller" and it has a microprocessor in it. ok!

author: nctnico
author_rank: Super Contributor
timestamp: May 13, 2012, 10:37:20 am
content: Quote from: nctnico on May 13, 2012, 01:38:02 amLets pull in SoC as well:SoC= cpu + peripherals which can run Linux

author: caroper
author_rank: Regular Contributor
timestamp: May 13, 2012, 02:30:58 pm
content: 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 MicroControllerThe advances in technology have blurred the old distinctions.

author: amspire
author_rank: Super Contributor
timestamp: May 13, 2012, 02:40:00 pm
content: Quote from: EEVblog on May 13, 2012, 09:04:14 amThat 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.

author: free_electron
author_rank: Super Contributor
timestamp: May 13, 2012, 05:34:53 pm
content: Quote from: nctnico on May 13, 2012, 10:37:20 amor Symbian , or PalmOS , or windows mobile , or Psos or Vxworks or iRMX. Soc are not restricted to linux ... linux is only small fry ...@eevblog :Quoteno 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 )

author: nctnico
author_rank: Super Contributor
timestamp: May 13, 2012, 08:36:26 pm
content: Quote from: free_electron on May 13, 2012, 05:34:53 pmLinux 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.

author: free_electron
author_rank: Super Contributor
timestamp: May 13, 2012, 08:57:24 pm
content: 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- ...

author: T4P
author_rank: Super Contributor
timestamp: May 14, 2012, 09:53:36 am
content: 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'esthey are all crappy compared to the free and real deal

author: baljemmett
author_rank: Unknown
timestamp: May 14, 2012, 12:07:03 pm
content: Quote from: Dave.S on May 14, 2012, 09:53:36 amThe 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.

author: T4P
author_rank: Super Contributor
timestamp: May 14, 2012, 06:16:11 pm
content: Quote from: baljemmett on May 14, 2012, 12:07:03 pmAlright, it's unix. Still a BAD version of unix.

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 15, 2012, 07:19:49 pm
content: 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 ownmicrocontroller - 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:Quote from: caroper on May 13, 2012, 02:30:58 pmNo. For simulation purposes only. Any useful uP is/has physical hardware.Quote from: caroper on May 13, 2012, 02:30:58 pmNo. 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)Quote from: caroper on May 13, 2012, 02:30:58 pmAgreed. 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.

author: nctnico
author_rank: Super Contributor
timestamp: May 15, 2012, 08:19:55 pm
content: Quote from: caroper on May 13, 2012, 02:30:58 pmAnd 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.

author: free_electron
author_rank: Super Contributor
timestamp: May 15, 2012, 09:52:33 pm
content: Soc's typically do not have on board memory. you need to tack on external Flash and (D)ram ...even the chip in an apple iPhone is an SoC. if you cut the thing apart there is actually two or three die's inside bonded to each other.the SDram sits in the same package but it is a separate die , made in a dfferent process. Same for the flash.As A-Sic Enginerd said : the fab processes of flash and dram are not good to make general purpose logic and vice versa. you burn too much real estate ... and cost for a chip is purely defined by its technology and square-millimetrage ...So Soc for cellphones often emply stacked-die. there are even special memories for mobile that internally are stacked die .... heck the large flash chips themselves are stacked die ...as for DSP .. yes some microprocessors have dsp-like instructions but a real DSP will still kick their butt... simply becasue of the multiple pathways a DSP has that a general processor does not have ... ( dsp's often have 2 or more data and address buses up to the streaming i/o capabilities )Intel 432 was the worlds first DSP.Microcontroller : all in one package . no need for support chips. some variants may require external ram/rom, although those were typically for debug purposes.. once you hit volume you switched to mask rom.Microprocessor : lots of external support chips and memorySoC : 'heavyweight' system integrated in a chip missing ram and rom.

author: A-sic Enginerd
author_rank: Regular Contributor
timestamp: May 16, 2012, 05:39:54 am
content: Quote from: free_electron on May 15, 2012, 09:52:33 pmI would actually be so bold as to make the statement the difference is strictly in the ROM. True, currently most SOCs do also require external RAM, but that's changing. It's kind of stupefying the amount of ram found on the SOCs I've worked on the last few years. Enough so that it's starting to be looked at to determine if there are applications where the external DDR can be done away with. Some applications will still require it simply due to the amount of data and throughput requirements. But more low end applications may be able to suffice with just the on board SRAM.

author: T4P
author_rank: Super Contributor
timestamp: May 16, 2012, 08:20:18 am
content: SoC's in phones usually have off board RAM because the ram buffer is used to store the display buffer ... and that's quite huge.In my mom's Galaxy Tab P-6800 ( the 7.7" 1.4GHz Dualcore model ) the amount used for the display buffer for 1280x800 is ... almost 400MegaBYTES.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 17, 2012, 01:03:14 am
content: I believe the line between microcontroller and SOC is the memory. If the chip can be used without external memory, it's a microcontroller. SOCs only have cache and various registers inside, while the main memory is external.

author: nctnico
author_rank: Super Contributor
timestamp: May 17, 2012, 01:06:58 am
content: Quote from: Dave.S on May 16, 2012, 08:20:18 amYou are a bit off. 1280x800x2=2MB.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 17, 2012, 01:17:45 am
content: Quote from: nctnico on May 17, 2012, 01:06:58 amThat would actually be x3 since the IPS panels are 8 bits per pixel. And 3D can use a lot of memory.

author: T4P
author_rank: Super Contributor
timestamp: May 17, 2012, 05:46:40 am
content: Quote from: nctnico on May 17, 2012, 01:06:58 amIt's not like i hacked deep into the system ... it's really very clear and the kernel eats up about 100 megbytes which is more accurately the screen chewed 300megbytes... really a hell lot