Introduction to Microcontrollers

게시자

Microcontrollers are everywhere, whether you’re driving your car, on your computer reading this (or smartphone/tablet) or making a cup of coffee on your coffee machine. With IoT rapidly increasing and data constantly being gathered, microcontrollers are a huge part of the modern world.

What is a Microcontroller? 

A microcontroller (sometimes called an MCU or Microcontroller Unit) is a single Integrated Circuit (IC) that is typically used for a specific application and designed to implement certain tasks. Products and devices that must be automatically controlled in certain situations, like appliances, power tools, automobile engine control systems, and computers are great examples, but microcontrollers reach much further than just these applications.

Essentially, a microcontroller gathers input, processes this information, and outputs a certain action based on the information gathered. Microcontrollers usually operate at lower speeds, around the 1MHz to 200 MHz range, and need to be designed to consume less power because they are embedded inside other devices that can have greater power consumptions in other areas.

Inside a Microcontroller: Essential Components

A microcontroller can be seen as a small computer, and this is because of the essential components inside of it; the Central Processing Unit (CPU), the Random-Access Memory (RAM), the Flash Memory, the Serial Bus Interface, the Input/Output Ports (I/O Ports), and in many cases, the Electrical Erasable Programmable Read-Only Memory (EEPROM). Figure 1 shows a great diagram of the main parts and also other parts in the microcontroller. Let’s dive into each of these components and see how they work inside the microcontroller.

0218 MCU_image

Figure 1: Parts of a microcontroller. (Source: Max Embedded)

Design of Microcontroller CPU

The CPU, sometimes called a processor or microprocessor, controls all of the instructions/data flow that it receives. You can think of it as the brains of the system, processing all the data input it receives and executes the required instructions. Its two main components are the Arithmetic Logic Unit (ALU), which performs arithmetic and logical operations, and the Control Unit (CU), which handles all of the processor’s instruction executions. Figure 2 shows a usual "machine cycle" that the CPU goes through.

0218_CPU Cycle

Figure 2: A typical machine cycle that the CPU executes. (Source: Computer Hope)

Microcontroller RAM

RAM is a component that temporarily stores data, and can be accessed quickly. It provides quick read-and-write access to the storage device. This differs from most other memories as it takes longer for data to be extracted since the data isn’t readily available. You can see it as RAM having access to the surface of data – easily reachable – but anything that dives deeper will require a different type of memory. RAM improves total system performance because it allows the microcontroller to work with more information at the same time. Since RAM is temporary data, its content is always erased when the microcontroller is shut down.

Use of Flash Memory in Microcontrollers

Flash Memory is a type of non-volatile memory that, unlike RAM, retains its data for an extended period, even if the microcontroller is turned off. This keeps the saved program that you might have uploaded to the microcontroller. Flash Memory writes to a “block” or “sector” at a time, so if you need to just re-write one byte, Flash Memory will need to re-write the whole block that the byte is in, which can wear out quicker.

What is EEPROM in Microcontrollers?

EEPROM is like Flash Memory, being a non-volatile memory and retaining its data even after shutdown. The difference is that, while Flash Memory re-writes a “block” of bytes, EEPROM can re-write any specific byte at any time. This extends the life of EEPROM compared to Flash Memory, but also means that it is more expensive.

Serial Bus Interface

A Serial Bus Interface is the serial communication in the microcontroller, sending data one bit at a time. With microcontroller boards, it connects ICs with signal traces on a printed circuit board (PCB). For ICs, they use serial bus to transfer data to reduce the number of pins in a package making them more cost effective. Examples of serial buses in ICs are SPIs or I2Cs.

Microcontroller I/O Ports

I/O ports are what the microcontroller uses to connect to real-world applications. Inputs receive changes in the real-world, from temperature sensing, to motion sensing, to push buttons, and much more. The input then goes to the CPU and decides what to do with that information. When it’s time to do a certain command based on a certain value from the input, it sends a signal to the output ports, where it can range from a simple LED light going off, to running a motor for a certain part, to many more. Figure 3 shows some common input and output components.

0218 IO ports

Figure 3: Common inputs and output components that are used for microcontroller. (Source: Marshall Ball)

관련 상품 참조

STM32L451RET6TR

STMicroelectronics Microcontrollers - MCUs 보기

관련 상품 참조

ATMEGA16A-PU

Microchip Technology Microcontrollers - MCUs 보기

관련 상품 참조

A000066 | Arduino Uno Rev3

Arduino Corporation Placas y kits de desarrollo del sistema integrado 보기

Hopefully this gives you a better idea what a microcontroller is, as well as some insight into the most important parts of a microcontroller. If you want to learn more about popular electronic components, you can check some of these articles out:

Know the Difference Between an Inverter, Converter, Transformer and Rectifier.

Read the different major types of Motion Sensors and how their physics make them work.

Look at the difference between the popular microcontroller, the Arduino Uno Rev3, and the popular SBC, the Raspberry Pi 3.

newsletter 1

최신 뉴스

Sorry, your filter selection returned no results.

개인정보 보호정책이 업데이트되었습니다. 잠시 시간을 내어 변경사항을 검토하시기 바랍니다. 동의를 클릭하면 Arrow Electronics 개인정보 보호정책 및 이용 조건에 동의하는 것입니다.

당사의 웹사이트에서는 사용자의 경험 향상과 사이트 개선을 위해 사용자의 기기에 쿠키를 저장합니다. 당사에서 사용하는 쿠키 및 쿠키 비활성화 방법에 대해 자세히 알아보십시오. 쿠키와 추적 기술은 마케팅 목적으로 사용될 수 있습니다. '동의'를 클릭하면 기기에 쿠키를 배치하고 추적 기술을 사용하는 데 동의하는 것입니다. 쿠키 및 추적 기술을 해제하는 방법에 대한 자세한 내용과 지침을 알아보려면 아래의 '자세히 알아보기'를 클릭하십시오. 쿠키 및 추적 기술 수락은 사용자의 자발적 선택이지만, 웹사이트가 제대로 작동하지 않을 수 있으며 사용자와 관련이 적은 광고가 표시될 수 있습니다. Arrow는 사용자의 개인정보를 존중합니다. 여기에서 당사의 개인정보 보호정책을 읽을 수 있습니다.