1.3 A computer in a die

The next step in this shrinking process is to integrate CPU, memory, and I/O into a single die; and this is exactly what micro-controllers do. A micro-controller (MCU) is a computer in a die. From the outside, they look just as any other regular IC, and often are indistinguishable from MPUs.

Figure 1.3 Die in a microchip package. Photo by Zephyris / CC-BY

MCUs and MPUs serve different purposes.The former ones are easier to connect with the world because I/O peripherals are built in. Also, there is no need for a memory controller,nor the memory itself to be placed in a motherboard together with the MPU. This means the effort that goes into designing MCU-based computer boards is less. Different MCUs have different I/O peripherals, from timers and clocks to Ethernet and USB controllers. The fewer external components required by a MCU allows for smaller computer boards and reduced production cost; which is good for, say, a washing machine manufacturer.

MCUs are typically the choice in small electronic systems such as computer keyboards, hard drives, refrigerators, anti-theft alarms, IoT objects,and even small robots. Modern cars, in particular, are a very good example of how ubiquitous MCUs have become given that they are shipped with no fewer than fifty of them.

Figure 1.4 EDBG chip debugger in the back of the SAM4S board

Nevertheless, MCUs are constrained in memory and CPU sophistication. The capacity of main memory seldom surpasses 512 KB; cache sizes go from none to a few KB; the fastest of them run at no more than a few hundreds of MHz;and certain more advanced CPU features such as memory management unit are not present. This is why MPUs are used in applications that demand more resources or more sophistication. Applications such as laptops, tablets, mobile phones, bank machines, WiFi routers, industrial and military robots, and aircraft systems. Incidentally, all these computer systems typically have micro-controllers for secondary processing. In other words, computers often have smaller computers alongside it doing specialized subtasks.

Now let us introduce the SAM4S board, which will serve as computer for the remaining of this book.