What Is Inside a Microcontroller?

A free video tutorial from Mark M. Budnik
Brandt Professor of Engineering, Valparaiso University
Rating: 4.6 out of 5Instructor rating
30 courses
92,909 students
What Is Inside a Microcontroller?

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. In 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 smartwatches, 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 the devices how to behave in the same section. We also saw what microcontrollers look like, like other computer chips, microcontrollers are found in black plastic packages about the size of a coin. They'll have small metal pins or connections sticking out of the black packages to connect to the outside world. They do come in a variety of 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 is 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 of 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 processes, the instructions from your program. The program itself is stored in a block called the program Memory. Next, the microcontroller needs to have a place to store information that it collects or processes. For example, it can store or remember if a button is pushed, the status of an output, perhaps the mostrillionecent 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 a microcontroller uses to do its job. We'll 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 program memory and rely upon an external solid state memory or magnetic hard drive to store their programs. Some microprocessors have a very small amount of data memory, often called cache. However, microprocessors generally rely upon an external integrated circuit or computer chip to store the majority of their data memory, too. Finally, microprocessors generally do not contain the peripherals that are found inside of a microcontroller. 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 highlighted 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 that 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 higher 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 coffee maker. 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 memory, a data memory and peripherals that perform additional functions. The CPU is a 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 this section. Up next, we will take a closer look at the different types of microcontroller program memory.