Electronic – Can you base a computer around a 32-bit microcontroller

computersmicrocontroller

We all have(mostly) 32-bit machines at our homes. But the 32-bit machines have a microprocessor in them. I was reading an article about the ARM Cortex. Its a 32-bit microcontroller. Now that intrigued a question inside me. Microcontrollers were made to decrease the external circuitry around a microprocessor, then the microprocessors became more powerful while microcontrollers remained in there 8 bit forms for too long a while. But now that we have 32-bit microcontrollers can't we have like a computer based around those things?

Best Answer

It depends on how you define 'computer'..

On the smaller end of the scale, what you might call traditional micro-controllers, you don't get memory management and seldom see any more RAM than the tiny amount embedded in the chip. I'll admit to very little knowledge about the architecture of the more capable micro-controllers now available, but the existence (or lack thereof) of these features is probably key to distinguishing between a device best suited for embedded applications or for general purpose computation.

By 'memory management' I'm referring to the capability to run programs in virtual address spaces and map these to the physical RAM available in the system, a function carried out by what's usually called a memory management unit (MMU).

Without an MMU, if you try to run multiple processes, all of them are forced to share a single address space, and this means that unless all processes involved adhere to your memory allocation scheme, one process can very easily crash another. So if you're in total control of designing all the processes, as with an embedded system, this isn't as much of a concern. However, if you're trying to support general purpose computation, you can't guarantee that all the code that will be executed will respect the memory allocation scheme, and the system will be rather fragile.

Lack of RAM is also not much of a problem for embedded systems, (1) because there's usually lots of flash, and (2) not being a general purpose computer means you don't have to worry about running un-anticipated programs at the behest of a user. You know ahead of time the sum total of all the software that will run on the system, and only need RAM for variables for that software. When you try to make your system into a general purpose computer, though, users are going to expect to be able to run whatever suits them, and this requires RAM.

Now, it's absolutely fine to do general purpose computation on devices without an MMU, and not much memory. The original 128K RAM, 8088 based (16 bit) IBM PC got away with this, as long as you only needed to run one program at a time.

So if you want to define 'computer' as something like 1982 technology, the answer is definitely yes. Or if you have a closed system where you can mitigate the problems of not having an MMU and/or much ram (e.g., cell phones) by carefully controlling the design of the software, also yes. Or, if your micro-controller has a built-in MMU and gobs of RAM (or can accommodate these externally), you should be able to construct a system that more resembles current computers.