What's the difference between a microcontroller and a microprocessor?

A microprocessor generally does not have RAM, ROM and IO pins. It usually uses its pins as a bus to interface to peripherals such as RAM, ROM, Serial ports, Digital and Analog IO. It is expandable at the board level due to this.

A microcontroller is 'all in one', the processor, ram, IO all on the one chip, as such you cannot (say) increase the amount of RAM available or the number of IO ports. The controlling bus is internal and not available to the board designer.

This means that a microprocessor is generally capable of being built into bigger general purpose applications than a microcontroller. The microcontroller is usually used for more dedicated applications.

All of these are very general statements. There are chips available that blur the boundaries.


As was mentioned microcontrollers are essentially systems on a chip. Except for some specialized peripherals everything is in one package. Interface to external peripherals is almost always done using serial connections. This keeps the package sizes small (less pins) and the PCB size small (less pins to connect between packages).

At the last Boston Barcamp (MIT 2009) I did an "Intro to Microcontrollers" talk. A copy of the handout is at

http://www.luciani.org/not-quite-ready/doc/intro-to-uC.pdf


Microcontrollers:

  • are typically 8-bit, but may be 4-, 16-, or 32-bit
  • run at speeds less than 200 MHz
  • use very little power
  • may provide enough current to operate an LED
  • are useful to interface with sensors and motors
  • are readily replaced, being inexpensive ($0.10 to $10)
  • are really constrained for RAM and persistent storage (flash space)
  • are really nice for electronics hobbyists

Microprocessors:

  • are often at least 16-bit, and typically 32-bit or 64-bit, though 8-bit still has a big market share
  • many will be able to do floating point math in hardware
  • run at speeds measured in hundreds of MHz
  • are designed to be the brains of a system (and need a whole system to support them)
  • need special hardware to interface with sensors, motors, LEDs, etc.
  • are expensive (think $50 - $250 for 32 or 64-bit)
  • are designed for external RAM and persistent storage (hard drives)
  • are not as easily worked with by a hobbyist

I find it interesting that the LEGO Mindstorms NXT set has a microprocessor [32-bit AT91SAM7S256 (ARM7TDMI) main microprocessor @ 48 MHz (256 KB flash memory, 64 KB RAM)] for doing the thinking, and a microcontroller [8-bit ATmega48 microcontroller @ 4 MHz (4 KB flash memory, 512 Bytes RAM)] for interfacing with the sensors and motors. See technical specifications on Wikipedia.