OSTG ThinkGeekSlashdotIT Product GuideNewsForgeLinux.comfreshmeatSourceForge.netNewslettersTechJobsBroadband Search   
DevChannel - Resources for Enterprise Developers Log inCreate Account  
Click here!
   NewsForge Linux.com IT Managers Journal Developer Channels   

 Newsletter Sign Up Falk AdSolution
Related Links

Online Books

 Section: Hardware
The Rise of the Stupid Chip: MCUs No Longer Embed-and-Forget
Wednesday April 16, 2003 - [ 03:00 AM GMT ]   Printer-friendly
Subsection: Feature
Topics: Hardware

by Nicholas Carroll

Embeddable chips. Like the insects of the computer world, proliferating steadily, pollinating flowers, hauling away garbage, and occasionally stinging us, they are embedded everywhere – uncool, uninteresting, and eminently forgettable, until your car's fuel injection logic fails in the passing lane. But times have changed, and Micro Controller Units likewise. With many of them essentially miniature motherboards, some even remotely programmable by modem, they are no longer a “fire and forget” piece of hardwiring, a bore you stuff under a car's dashboard and ignore.

Why be surprised? Puny PDPs replaced 360s; DECs replaced PDPs; Sparcs replaced DECs. Today? Even smaller Pentiums running Linux, racked in parallel, could be called today's big iron. As x86 chips evolved along the lines of Moore's Law, so have the components of MCUs.

Before anyone charges the microphone to shout "disruptive technology!"-- a la The Innovator's Dilemma -- let us remember that Clayton Christensen's disruptive technologies took decades to replace the market leaders. (And after the Japanese motorcycles had taken over the marketplace, the hogs returned in force anyway.)

No, MCUs won't replace x86 CPUs overnight, if ever; in fact, with short-range modems now in the 5-cent range, and short-range transmission standards settling into place, a new form of client-server relationship may evolve.

Developers who have never run at the bare metal are about to live in interesting times. Many of these babies -- perhaps half -- don't even have
Click here!
an OS. Some of the data storage chips are so elementary they look like a grid of Turing code strips. This doesn't faze electrical engineers at all, since they're used to building logic every time they drop a gate into a schematic, but it will be new to programmers who came to computing after 1970.

Since MCUs are primarily stand-alones, expected to not only process data but generally to control devices as well, they necessarily have more on the board than just a CPU and some memory. A typical MCU might have a 25MHz 8-bit CPU, 32k of memory, a clock, often an A/D converter, ports (serial or parallel), and the ability to generate analog signals (D/A converters or similar). Some MCUs have connectivity to Ethernet cards for TCP/IP based connections to PCs and other hosts. Others sport microcontrollers that have audio/video output.

Someone really determined to build from scratch could build a CPU from an FPGA. But it's not a good idea. Most MCUs have a processor, whether a very cheap ASIC, or a more robust ARM or 8051 series. They range from 4 to 16-bit, most of them being CISC rather than RISC, even in battery powered devices. (This might seem nutty given CISCs' reputation as power hogs, but remember that busses are power hogs too, and a RISC in the wrong place can work the bus pretty hard.)

Admittedly some of the larger embeddable chips make the stretch for bloat-land, stuffing Java in a matchbox, but 32K of memory is fairly typical. The world's best garbage collection still doesn't allow for anything but very tight code.

Reprogrammable MCUs

In MCU-land, "reprogammable" can have several meanings. The chip might be 90% reprogrammable by modem. Or you might have to plug a control device into a socket. In the latter case, this is definitely a world of thinking ahead. But in either case, there is usually not enough memory to be coding around bugs. You get it right before you embed.

MCUs involve a shift in thinking. Because their limitations restrict most of them to running on C or assembler, coding to most MCUs is definitely running at or near the bare metal. When they become reprogrammable, I'd call it "running at the molten metal."

In fact reprogrammable MCUs push a developer halfway into the realm of chip design, and it is said that chip designers are born, not made. Some coders will be wired for it, some won't.

(Marketing departments have gotten a bit careless in their product terminology, so "programmable" -- what MCU isn't, unless it's completely hardburned? -- could mean anything from programmable once to reprogrammable on the bench to reprogrammable by modem. Likewise configurable or re-configurable. To one company this means the software is re-configurable, to the next company it means the hardware is.)

The Analog Divide

The digital/analog MCUs are particularly fascinating, in that where digital data processing is a second-tier representation of reality, analog is the electrical real-time expression of reality.

Analog? Analog is unreliable, right? That's why computers are binary, isn't it? In fact digital was once unreliable, hence the "tell me thrice" rule of early digital error-checking. A reading of Robert Maxwell reveals that electricity is not at all a simple yes/no, positive/negative world. Electrons have multiple states, and that is precisely why computers went digital -- the early analog computers of the 1950s, though they worked, had to be manufactured to much more precise (expensive) tolerances. So computing took the digital path, and all was forcibly reduced to binary logic. With manufacturing costs plummeting, precise analog chips have now become affordable.

A Question of Speed and Versatility

Once you get past how difficult chip design can be, the brains are in the software. After all, even a latest-generation x86 CPU with nothing but BIOS available isn't much smarter than an earthworm. Which is as it should be, since x86s are built for versatility more than speed, clock-rate wars notwithstanding.

Software is also where the stupidity lies. When a bloatware app runs slower from hard drive than SRI's 1968 oNLineSystem did with a 1200 baud client-server connection, it is time to start wondering what clock speed is worth. A two-second wait for a word processor app to reveal its style menu is annoying; a two-second wait for your anti-lock brakes to kick in is a fine reminder that "interactive" means "right now!" An MCU with a 25MHz clock rate might seem laughable at first, until you see how fast these critters can respond in realtime.

The trade-off, of course, is speed vs. flexibility. An MCU gets its response time from dedicated design and lean code, and cannot match the versatility of an x86 box.

Or can it? MCUs have gotten a lot smarter in the last few years. Some industrial-strength MCUs can run on networks, controlling and monitoring video terminals with sophisticated GUIs. When they are remotely reprogrammable via modem or Ethernet, they become a living component of a device. The "expert within" the coding can be altered to adjust to new conditions. This gives the programmer far more latitude to anticipate contingencies. When situation A changes to situation B, the chip can morph to new logic.

Aside from increased flexibility, this makes reprogrammable MCUs a two-for-the-price-of-one solution -- or better. They won't run an officeware suite -- but they might do everything you really need done.


At first glance MCUs are a harsh world for programmers who started on Java or Perl. There is no place to store a 500kb interpreter, much less a full OS.

In some ways this is counter-intuitive for anyone who learned programming after 1970, we are so used to having an OS. But computers don't strictly need an OS to operate, in fact the early ones didn't have an OS at all. Far from being a constraint, there's a certain feeling of freedom designing logic in a world where you make your own rules, and almost all the logic all belongs to you.

For those inclined to download a developer's kit, and roll their own mini-motherboard, there is definitely fun to be had at the bare metal.

Uses For MCUs

Some of these devices are off-the-shelf, others are geekware which engineers assembled in their spare time for fun, and certainly were not cost-effective. However -- today's experiment is tomorrow's production item.

XML processing. Cheap MCUs can render analog input to digital and then into XML for immediate upload by modem, or later plug-in upload, or for realtime transfer on a network. This usage goes beyond cars or factories; any number of field devices from medical monitors to geologists' spectral analyzers may be using them soon.

Wireless data acquisition, such as Ericsson's ROK 101 007 module. MCUs are and will continue to be a vital part of "the wireless Web."

And for those who insist on Java at JRealTime, you can buy a "JStamp" 32-bit native Java MCU with up to 2mb flash memory for under $100. For a truly geekish application, don't miss the "Sumo robots."

Engineers Having Fun

Remote building control with SMS. An article describing how an engineer made a friend's business controllable through his cellular phone.

Web link monitoring system that pops up warning flags on any browser when it receives signals from remote monitoring devices. Like the previous example, this was an engineer experimenting. Code and parts list are here (105 files in that zip file. Can't complain about a lack of docs or demos).

Digital Joystick. An engineer got tired of replacing joysticks when the potentiometers wore out, so he built one with magnets and Hall effect switches feeding an Atmel AT90S4414 MCU.

Glossary of MCU Terms

ASIC Application-Specific Integrated Circuit. Low-cost mass production ICs designed for a specific task set.
FPGA Field Programmable Gate Array. These chips are commonly used in prototyping MCU core processors. A mass of undefined gates (typically comprised of 4 to 6 transistors each), they are a lump of clay out of the box, a tabula rasa. Using x86-based design tools, the designer defines the individual gates functions with Boolean logic. In theory FPGAs are mainly prototyping tools, and when the design is debugged, it is manufactured in mass on much cheaper ASICs. In practice, the effort of extracting a schematic from an FPGA, plus time-to-market issues, mean that the product usually ends up in production using the larger, slower FPGAs themselves instead of ASICs. Many FPGAs are hybrid, a block of gates with an embedded processor.
MCU Micro Controller Unit. Essentially, a miniature motherboard. Definitions of what makes for a "real" MCU are all over the place. A processor, some memory, and I/O capability would be about the minimum to qualify.
Softcore Manufacturers and writers often use the word as a noun, as in "a softcore FPGA". Actual MCU coders use the word as an adjective, as in "an FPGA with a softcore OS and multiplier" -- meaning that the OS and multiplier are software, like a Java virtual machine. From the coders' point of view, an FPGA stops becoming "a softcore" pretty quick once a processor is embedded in it. (Fulltime MCU coders even wince at the Java analogy, pointing out that the Java kernel doesn't have many switches available. To them softcore also means reprogrammable.)

Chip and Software Roundup

These are some of the leading manufacturers of MCU boards. Most have a core product such as a processor or FPGA that they build on with other manufacturer's components.

Digital Chips
  • Atmel manufactures everything from good old EPROMs to ARMs to graphics and communications MCUs.
  • >
  • Triscend produces ARM based MCUs they call CSoCs (Configurable System-on-Chip). The A7 series are their most advanced models.
Antifuse Chips
  • Actel. These are antifuse chips; burn once and once only. However, they do have the advantage of working entirely off internal Flash memory, hence a faster boot and more security than chips using expensive external SRAM. (Anti-fuse chips come with contacts open. When you are ready to burn your logic, you apply the program signal which melts and fuses the lines on the chip, closing the contacts permanently. Hence the name "anti-fuse" -- normal fuses are closed until excess current passes through them.)
Analog Chips
  • Cypress' PSoC (Programmable System on Chip), aside from its mixed digital/analog capability, is notable for the option of a 5-cent modem. These are possibly farthest along the analog path, with Cypress engineers expressing confidence that the internal signals can be acquired and processed accurately to 13 bits or more.
  • Microchip manufactures a variety of analog as well as digital chips.
FPGAs (Field Programmable Gate Arrays)
  • Altera's FPGAs incorporate their NIOS processor within the FPGA itself, complete with miniature OS. The company has taken an odd -- and probably wise -- approach to the threat of customers porting the logic to cheaper ASICs for large production runs: for significant production runs, they will port the logic themselves and deliver ASICs.
  • Xilinx FPGAs come with up to 4 embedded PowerPC processors.
Java Chips
  • Jrealtime packs native Java on a pretty small chip. I guess it qualifies as an MCU, if a pretty large one.
Software and Test Equipment
  • Keil Software makes C compilers, macro assemblers, real-time kernels, debuggers, simulators, integrated environments, and evaluation boards for the 8051, 251, ARM7, and C16x/ST10 microcontroller families.
  • Wind River offers MCU OSs such as VxWorks and pSOSystem, as well as development tools, middleware, and OS extensions.

Note: though I've yet to see an MCU that will run Linux, I was happy to find that some of these OSs use the GCC compiler.

Online Resources
  • Circuit Cellar (magazine and online). I read it for the ads as much as the articles. While fully-assembled industrial-duty MCUs can run hundreds of dollars, the prices of components sold in the back pages of the magazine make your eyes bug out; who'd expect to buy a key circuit board component for $4.00?
  • Design Wave
  • Embedded.com
  • Electronicstalk
  • FPGA CPU News
  • JimTurley.com. In person Turley is blunt, insightful, and hilarious. Online, alas, he's only blunt, insightful, and witty. A recommended read. (You'll also find his articles on some of the web sites above.)
  • Opencores.org
  • MCU programming forums, news, and links, plus downloads of dozens of pieces of open source MCU code, from microprocessors to video controllers, generally GPL or BSD licenses. Most of the code is VHDL or Verilog. Best of all, most of the projects are marked "Done"! This is a site for sore eyes, clean and easy to navigate.

Hastings Research 2003. All rights reserved.

This discussion has been archived. No new comments can be posted.
The Rise of the Stupid Chip: MCUs No Longer Embed-and-Forget | Log in/Create an Account | Top | Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Falk AdSolution

Click here!

Falk AdSolution


Sign up for the weekly newsletter.
Email Address:


Get special offers especially for:
Software Developers

Get special offers on:


Copyright 2005 - OSTG, Inc., All Rights Reserved
About Devchannel  •  Privacy Statement  •  Terms of Use  •  Advertise  •  Contact Us