What is a microcontroller?
A microcontroller is an integrated circuit (IC) device used to control other parts of an electronic system, typically through a microprocessor device, memory, and several peripheral devices. These devices are optimized for embedded applications that require both processing capabilities and flexible, fast interaction with digital, analog or electromechanical components.
The most common way to refer to this category of integrated circuits is "microcontroller", but the abbreviation "MCU" is also used interchangeably, as it stands for "microcontroller unit". You'll also sometimes see "µC" (where the Greek letter mu replaces the prefix "micro").
"Microcontroller" is a well-chosen name because it highlights the defining characteristics of this product category. The prefix "micro" implies small size, and the term "controller" here implies advanced ability to perform control functions. As stated above, this functionality is the result of combining a digital processor and digital memory with additional hardware that is designed specifically to help the microcontroller communicate with other components.
Microcontrollers and microprocessors
People sometimes use the term "microprocessor" when referring to a microcontroller, but the two devices are not necessarily identical. Both microprocessors and microcontrollers operate as small, highly integrated computing systems, but they can serve different purposes.
The term "processor" is used to identify a system that consists of a central processing unit and (optionally) some memory. A microprocessor is a device that implements all the functionality of a processor in a single integrated circuit. Microcontrollers, by comparison, place more emphasis on additional hardware modules that allow the device to control the system rather than simply execute instructions and store data.
Below is a diagram that illustrates this concept.
Diagram explaining the difference between the terms "microcontroller" and "microprocessor"
In general, using the terms "microprocessor" and "microcontroller" interchangeably is not a big problem when we speak informally and try not to repeat the same word over and over again. However, in the context of a technical discussion, it is important to maintain the distinction between the two concepts.
Microcontrollers and Digital Signal Processors (DSP)
A digital signal processor (or DSP) is a microprocessor optimized for complex computing tasks such as digital filtering, real-time signal analysis, and data compression. A very complex microcontroller may be able to replace a digital signal processor, but it is still considered a microcontroller if a significant portion of its internal circuitry is dedicated to controlling, monitoring, and communicating with the surrounding system.
AVR-DD Series
This series includes 12 devices with memory capacities of 16...64 kB in packages with 14...32 pins. The series is scheduled for release in the second quarter of 2022. The characteristics of the devices included in the series are shown in Table 3.
Table 3. Composition and characteristics of the AVR-DD series
Name | Core frequency, MHz | Flash, kbyte | SRAM, kbyte | EEPROM, byte | Conclusions | 12 bit ADC | 10 bit DAC | Comparators | MVIO Conclusions | ZCD | USART/SPI/I2C | Timers | Housings |
AVR64DD14 | 24 | 64 | 8 | 256 | 14 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 4 | SOIC |
AVR64DD20 | 24 | 64 | 8 | 256 | 20 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 4 | SOIC, VQFN |
AVR64DD28 | 24 | 64 | 8 | 256 | 28 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 5 | SPDIP, SOIC, SSOP |
AVR64DD32 | 24 | 64 | 8 | 256 | 32 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 5 | TQFP, VQFN |
AVR32DD14 | 24 | 32 | 4 | 256 | 14 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 4 | SOIC |
AVR32DD20 | 24 | 32 | 4 | 256 | 20 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 4 | SOIC, VQFN |
AVR32DD28 | 24 | 32 | 4 | 256 | 28 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 5 | SPDIP, SOIC, SSOP |
AVR32DD32 | 24 | 32 | 4 | 256 | 32 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 5 | TQFP, VQFN |
AVR16DD14 | 24 | 16 | 2 | 256 | 14 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 4 | SOIC |
AVR16DD20 | 24 | 16 | 2 | 256 | 20 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 4 | SOIC, VQFN |
AVR16DD28 | 24 | 16 | 2 | 256 | 28 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 5 | SPDIP, SOIC, SSOP |
AVR16DD32 | 24 | 16 | 2 | 256 | 32 | 1 | 1 | 1 | 8 | 1 | 2/1/1 | 5 | TQFP, VQFN |
The AVR-DD series occupies a niche of more compact devices with reduced memory capacity. Its set of peripherals no longer contains such specific modules as the Peripheral Touch Controller or operational amplifiers. Otherwise, the qualitative composition of the periphery has not changed, but the number of modules has been reduced:
- one Zero Cross Detector module;
- one comparator;
- six event system channels;
- two USART modules, one SPI and one I2C.
The DD series and DB series are united by support for MVIO technology on Port C and support for external high-frequency quartz.
Main components of the microcontroller
The microcontroller consists of a central processing unit (CPU), non-volatile memory, non-volatile memory, peripheral devices and auxiliary circuits.
Central Processing Unit (CPU)
The central processing unit performs arithmetic operations, controls the flow of data, and generates control signals according to a sequence of instructions created by the programmer. This extremely complex circuitry required for the processor's functionality is not visible to the designer. In fact, thanks to integrated development environments and high-level languages such as C, writing code for microcontrollers is often a fairly simple task.
Memory
Non-volatile memory is used to store the microcontroller program, that is, an (often very long) list of machine language instructions that tell the processor exactly what to do. Typically, instead of "non-volatile memory" you will see the word "flash", which refers to a specific type of non-volatile data storage.
Volatile memory (i.e. random access memory, RAM) is used to temporarily store data. This data is lost when the microcontroller loses power. Internal registers also provide temporary storage of data, but we do not consider them as a separate functional unit since they are integrated into the central processor.
Peripherals
We use the word "peripheral" to describe the hardware modules that help the microcontroller communicate with an external system. The following paragraphs describe the various categories of peripherals and provide examples of them.
- Data converters: analog-to-digital converter, digital-to-analog converter, reference voltage generator.
This graph shows three-axis accelerometer data digitized using the microcontroller's built-in ADC - Clock generation : internal oscillator, quartz oscillator circuit, phase-locked loop.
- Time calculation : general purpose timer, real time clock, external event counter, pulse width modulation.
- Analog signal processing : operational amplifier, analog comparator.
- I/O : General purpose digital input and output circuits, parallel memory interface.
- Serial communication : UART, SPI, I2C, USB
Auxiliary circuits
Microcontrollers include many functional blocks that cannot be classified as peripheral devices because their primary purpose is not to control, monitor, or communicate with external devices. However, they are very important - they support the internal workings of the device, simplify implementation and improve the development process.
- The debugging circuit allows the developer to closely monitor the microcontroller as instructions are executed. This is an important and sometimes necessary method of tracking bugs and optimizing firmware performance.
- Interrupts are an extremely valuable form of microcontroller operation. Interrupts are generated by external or internal hardware events and cause the processor to immediately respond to these events by executing a specific group of instructions.
Microcontroller programs written in C are organized into functions. An interrupt causes program execution to "jump" into an interrupt service routine (ISR), and after the ISR has completed its tasks, the processor returns to the function that was executing when the interrupt occurred. - A clock generation module can be considered a peripheral device if it is designed to generate signals that will be used off-chip. But in many cases, the main purpose of the microcontroller's internal oscillator is to provide a clock signal for the central processor and peripheral devices. Internal oscillators often have low accuracy, but in applications that can tolerate this low accuracy, they are a convenient and efficient way to simplify the design and save board space.
- Microcontrollers can include various types of power supply circuits . Integrated voltage regulators allow the chip itself to generate the required supply voltage, power management modules can be used to significantly reduce device current consumption in idle states, and supervisor modules can force the processor into a reset state when the supply voltage is not high enough to ensure reliable operation.
AVR-DA Series
The AVR-DA series consists of 11 devices with memory options from 32 to 128 kB in 28...64 pin packages. This series was released first, all of its representatives are already available for order. Table 1 shows the composition of the series and parameters of the microcontrollers.
Table 1. Composition and characteristics of the AVR-DA series
Name | Core frequency, MHz | Flash, kbyte | SRAM, kbyte | EEPROM, byte | Conclusions | 12 bit ADC | 10 bit DAC | Comparators | PTC | ZCD | USART/SPI/I2C | Timers | Housings |
AVR128DA28 | 24 | 128 | 16 | 512 | 28 | 1 | 1 | 3 | 1 | 1 | 3/2/1 | 5 | SPDIP, SOIC, SSOP |
AVR128DA32 | 24 | 128 | 16 | 512 | 32 | 1 | 1 | 3 | 1 | 1 | 3/2/2 | 5 | TQFP, VQFN |
AVR128DA48 | 24 | 128 | 16 | 512 | 48 | 1 | 1 | 3 | 1 | 2 | 5/2/2 | 7 | TQFP, VQFN |
AVR128DA64 | 24 | 128 | 16 | 512 | 64 | 1 | 1 | 3 | 1 | 3 | 6/2/2 | 8 | TQFP, VQFN |
AVR64DA28 | 24 | 64 | 8 | 512 | 28 | 1 | 1 | 3 | 1 | 1 | 3/2/1 | 5 | SPDIP, SOIC, SSOP |
AVR64DA32 | 24 | 64 | 8 | 512 | 32 | 1 | 1 | 3 | 1 | 1 | 3/2/2 | 5 | TQFP, VQFN |
AVR64DA48 | 24 | 64 | 8 | 512 | 48 | 1 | 1 | 3 | 1 | 2 | 5/2/2 | 7 | TQFP, VQFN |
AVR64DA64 | 24 | 64 | 8 | 512 | 64 | 1 | 1 | 3 | 1 | 3 | 6/2/2 | 8 | TQFP, VQFN |
AVR32DA28 | 24 | 32 | 4 | 512 | 28 | 1 | 1 | 3 | 1 | 1 | 3/2/1 | 5 | SPDIP, SOIC, SSOP |
AVR32DA32 | 24 | 32 | 4 | 512 | 32 | 1 | 1 | 3 | 1 | 1 | 3/2/2 | 5 | TQFP, VQFN |
AVR32DA48 | 24 | 32 | 512 | 4 | 48 | 1 | 1 | 3 | 1 | 2 | 5/2/2 | 6 | TQFP, VQFN |
The changes affected the core and its power supply system: the core can operate at an increased maximum frequency of 24 MHz over the entire supply voltage range of 1.8...5.5 V.
For the first time in AVR devices, the Zero Cross Detector module appeared - a detector for alternating current crossing the zero level. Previously, this was a peripheral characteristic only of PIC controllers.
The ADC has been updated: the new version provides analog voltage digitization with a frequency of up to 130 Hz and a 12-bit resolution with the ability to enable differential operating mode. The battery has been increased to 128 samples. As in the previous version, the following operating modes are supported:
- unit conversion;
- continuous conversion mode;
- accumulation mode;
- threshold comparison mode;
- event trigger mode;
- temperature measurement mode (from the built-in temperature sensor).
A DAC module has appeared in the devices of the new line. Let us remember that the Mega did not have this. The converter operates at 140 ksps and has a resolution of 10 bits.
Compared to the ATmega line, the number of the following peripheral modules has been increased:
- the number of USART modules has been increased to six;
- the number of analog comparators has been increased to three.
Let's pay attention to the presence of specific peripherals - Peripheral Touch Controller, a touch controller that allows you to implement capacitive touch controls - buttons, sliders, spinners and 2D surfaces. Thanks to the QTouch Library, setting up this module is reduced to a few mouse clicks.
The block diagram of the AVR-DA series devices is shown in Figure 1.
Rice. 1. Block diagram of devices of the AVR-DA family
To evaluate the capabilities of the new series and rapid prototyping of devices based on it, Microchip has released a development board AVR128DA48 Curiosity Nano Evaluation kit , which is shown in Figure 2.
Curiosity Nano line of development boards are Microchip's most basic development boards. Curiosity Nano line boards contain a standard set of components:
- one custom button;
- one user LED;
- built-in programmer/debugger with USB port.
This board, in addition to the standard set of components, has a soldered clock quartz.
Rice. 2. Development board AVR128DA48 Curiosity Nano Evaluation kit
Curiosity Nano boards can be connected as a processor module to the Curiosity Nano Base Board, which contains three microBUS expansion ports used to connect Click Boards expansion modules from MikroElektronika , and one Xplained Pro expansion port to connect Microchip expansion modules of the same name. The base board is shown in Figure 3.
Rice. 3. Curiosity Nano Base Board