Microcontrollers: Architecture and Uses of This Type of CPU

Microcontrollers are the most widely used type of processor in the world and can be found everywhere. They are not only found in different parts of your PC and even within some components. But, for example, the refrigerator in your house, the car with which you travel every day and even the elevator with which you access your apartment there is one. But what exactly are they?

If you ask anyone what type of logical processing unit is most used then the answer will always be a CPU, but it is not, since microcontrollers are everywhere. Even inside your PC’s CPU. How are they different from a conventional CPU and where are they used?

Microcontrollers

What are microcontrollers?

A microcontroller like a SoC is a system on a chip, but with an important difference and that is that the memory in which the programs are executed is not located on a separate chip but within the same chip. So the microcontroller completely lacks addressing pins and data that communicate with an external RAM memory.

The memory inside the microcontroller is a flash memory of the programmable type, which is accessed through the input and output pins around the microcontroller. Because it does not use conventional RAM memory but rather programmable and non-volatile memory, this means that the access time to data and instructions is much higher than in a CPU and therefore microcontrollers operate at much lower clock speeds. at the same time this allows them to consume much less energy.

In addition, the fact of having the memory with the data of the program allows not only the use of a Von Neumann architect where data and instructions are together. In the case of some microcontrollers, both data and instructions are separated using a Harvard-type architecture.

Microcontroller example, Microchip PICs

microcontroladores PIC16F

The PIC16F887 is a microcontroller that has been used in many places throughout its history, its specifications are as follows:

  • Its internal CPU has a RISC-type ISA with only 35 instructions, which have a timing of 1 cycle per instruction, with the exception of jump instructions.
  • It works between 0-20 MHz clock speed.
  • It has 8KB of programmable ROM memory as system memory, which can be modified up to 100,000 times.
  • It also has 256 bytes of EEPROM memory.
  • For temporary data it has 368 bits of RAM.
  • It has three counter units, with which we can count the clock cycles in which each instruction is executed, these are key to be able to perform certain functions.
  • 35 input and output pins, to program the microcontroller or communicate with peripherals.

In order to program these microcontrollers, a software called MPLAP IDE is used, which supports all PIC microcontrollers and with which we can program said microcontrollers through assembly language or through an integrated C compiler.

The PIC architecture is not the only microcontroller in the world, but it has been one of the most used, among which we can find several brands, the most famous being the Atmel AVR used on the Arduino platform. , which has surpassed PIC in popularity in recent years.

Microcontrollers in our daily life

Procesador

  • Microcontrollers are used in various places on a day-to-day basis, here are a few examples of their use:

Calculadora Cientifica

  • Although they are being replaced by mobiles, the low-cost, pocket calculators commonly used in teaching settings are simple enough to use an internal microcontroller.

Lavadora Microcontrolador

  • Do you need to wash your clothes? Well, you should know that whether you do it in the washing machine at home or in an industrial one, there is a microcontroller behind it.

Robot Industrial microcontroladores

  • The robots in the assembly lines repeat the same processes over and over again, they are executing a program, which is executed by a microcontroller.

There are many examples from daily life where there is a microcontroller behind making such a task or application possible, so without them life would be more complicated.