What Is Inside a Microcontroller?

Mark M. Budnik
A free video tutorial from Mark M. Budnik
Brandt Professor of Engineering, Valparaiso University
4.7 instructor rating • 30 courses • 72,520 students

Lecture description

Students will be able to explain the functional blocks found inside of microcontrollers.

Learn more from the full course

Microcontrollers and the C Programming Language (MSP430)

Create C programs for a microcontroller using inputs/outputs, timers, analog-to-digital converters, comm ports, and LCD.

01:45:27 of on-demand video • Updated May 2020

  • Program microcontrollers with the C programming language.
  • Use timer peripherals
  • Use communication peripherals
  • Use analog-to-digital converter peripherals
  • Use a liquid crystal display (LCD)
  • Use the MSP430 to develop embedded systems
English [Auto] Welcome back and this section, we're going to learn a little bit more about what is inside of a microcontroller recall in our first section, we said a microcontroller is a type of integrated circuit or computer chip that is found in most electronic devices, including things like phones and smart watches, cars and toys. However, unlike other types of computer chips, microcontrollers are programmable. That is, as a designer, you can tell the microcontroller what you want it to do by giving a special set of instructions. With these instructions, microcontrollers can serve as the brains of electronic devices, telling devices how to behave in the same section. We also saw with microcontrollers look like like other computer chips. Microcontrollers are found in black plastic packages. Both sides of a coin still have small little pins or connections sticking out of the black packages to connect to the outside world. They do come in a variety different shapes and sizes, each designed to optimize the size, ease of handling and the number of pins or connections. Here we are showing you a block diagram or a high level representation of what you would find inside of a microcontroller. At the top, there's a component that is called the central processing unit, or CPU, occasionally it is referred to as the core, but that is more of a slang term. It is the CPU that does the actual processing information and instructions in the microcontroller. If the microcontroller is the brain of an embedded system, you can think of the CPU as the cerebrum of the brain, the CPU processors, the instructions for your program. The program itself is stored in a block called the Program of Memory. Next to microcontroller needs to have a place to store information that it collects or processes, for example, it can store. Remember, if a button is pushed, the status of an output, perhaps the most recent temperature that it measured. All of this information is stored in a block called data memory. Finally, microcontrollers have a functional block called peripherals. Unlike program and data memory, there is not a standard or universally accepted definition of a peripheral. For now, we will just say it is the block that contains all of the additional features that microcontroller uses to do its job will go into more details about peripherals in a couple more videos. While we have this block diagram of a microcontroller up, it's a good opportunity to graphically show the differences between microcontrollers and microprocessors. Microprocessors typically do not have any internal programmed memory and rely upon an external solid state memory or magnetic hard drive to store the programs. Some microprocessors have a very small amount of data memory, often called cash, however, microprocessors generally rely upon an external integrated circuit or computer chip to store the majority of their data memory to. Finally, microprocessors generally do not contain the peripherals that are found inside of a microcontroller. Well, what about the rest? Well, since the microprocessor just contains the CPU, the remainder of the functional blocks are generally added to the system with external integrated circuits. Take a look at this integrated circuit board. The holidayed integrated circuit is a microprocessor. The rest of the integrated circuits are computer chips, provide the microprocessor with its data memory program, memory and peripherals. Here's an example of a circuit board that uses a microcontroller. Again, we see the microcontroller essentially stands by itself and contains almost all of the required circuitry to serve its role as the brains of the embedded system. We say that the microcontroller is more highly integrated than the microprocessor. This high level of integration can reduce the overall cost of an embedded system. But by integrating additional features into a microcontroller, it means that particular versions of a microcontroller may not be usable in other applications. The perfect microcontroller for a washing machine may not work well in a coffeemaker. This is the reason that some companies will develop hundreds of different versions of microcontrollers. So you can pick the microcontroller for your embedded system that is the best fit of memory and features that you need. Just remember, microcontrollers have four main components a CPU, a program, a memory, a data memory and peripherals that perform additional functions. The CPU is relatively complex component and we already know enough about it to get by. But for those that are interested, a bonus section is included on the CPU at the end of the section. Up next, we will take a close look at the different types of microcontroller program memory.