Analog vs. Digital Signals
Microcontrollers are electronic components used to control electrical equipment.
In addition to familiar household appliances such as washing machines and air conditioners, many microcontrollers are used per vehicle in automobiles that require complex control.
Although various signals can be input to a microcontroller to operate it, only digital signals can be handled inside the microcontroller. Therefore, analog signals observed from the real world are converted into digital signals before use.
It is important to understand the characteristics of analog and digital signals, which are signals with different properties. This section explains the analog and digital signals handled by microcontrollers.
- How a Microcontroller Reads Data
- Analog Signals
- Digital Signals
- Comparison of Analog and Digital Signals
How a Microcontroller Reads Data
A microcontroller is a device that processes programs internally based on some signal input through I/O ports (input/output ports) and outputs the results from the I/O ports. Taking an air conditioner as an example, analog signal information acquired by a temperature sensor is digitized, processed within a program, and then output as a signal to turn on heating or cooling.
The CPU inside a microcontroller can only handle digital signals. Therefore, analog signals must always be converted into digital signals by A/D conversion (analog-to-digital conversion) before use.
One of the key points in A/D conversion is resolution. Resolution quantifies the ability to detect the target signal in detail, and options like 8-bit or 24-bit can be selected. However, high-resolution converters tend to have lower maximum sampling rates, so if sampling speed is prioritized, the resolution must be lowered to some extent. Since A/D conversion involves a trade-off between “speed” and “accuracy,” the sampling cycle is adjusted along with the resolution to find the resolution and sampling speed values that allow the desired input information to be properly captured. Although some microcontrollers have built-in conversion circuits, an external A/D converter may be required depending on the necessary conversion speed and resolution.
Using an external converter requires hardware design that considers layout and power supply, and also changes the microcontroller control method. Therefore, there is a significant difference between handling A/D conversion internally or externally to the microcontroller.
Analog Signals
This section introduces the mechanism and advantages of analog signals.
How Analog Signals Work
The characteristic of analog signals is that they have continuity.
Because they have continuously changing values, they draw smooth lines when graphed. Consequently, analog signals are easily affected by the elements that generate them, and the signals may degrade depending on noise or the impedance of the hardware used. In addition, to continuously acquire information, current must constantly flow through the circuit.
Advantages of Analog Signals
Because analog signals can transmit large amounts of information with high accuracy, they can convert physical phenomena existing in nature into electrical signals.
These signals can be recorded with waveforms close to actual phenomena, enabling natural representation of data acquired by sensors and other devices. Their strength lies in their suitability for real-time transmission because they can smoothly convey continuous waveform changes. Analog signals are widely used in audio equipment and sensor technology.
Digital Signals
This section introduces the mechanism and advantages of digital signals.
How Digital Signals Work
Digital signals do not have continuity because they represent signals by encoding them into binary numbers of 0 and 1.
Generally, digital signals have thresholds, and when a value exceeds the threshold, the data is rounded or truncated. Since there are no ambiguous values, they offer high reproducibility. Communication using digital signals is essential to achieve the high-quality communication required by modern digital devices.
Advantages of Digital Signals
Because digital signals consist of simple binary representations, they are resistant to degradation and suitable for transmitting accurate information.
They are also less susceptible to noise, and because data compression is possible, transmission over long distances is also possible. Although images and sound sources may degrade due to data compression, this is strictly an issue with the compression conversion method. Digital data itself does not degrade through copying or compression.
Comparison of Analog and Digital Signals
Analog signals are well suited to continuously capturing phenomena.
Digital signals are discrete, and while they have no intermediate values, they are resistant to noise, allowing them to transmit signals accurately. Because their characteristics differ, it is common in embedded systems to use a combination of both. Microcontrollers convert external analog signal inputs using an A/D converter and handle them internally as digital signals.
When we check the output results, it is necessary to convert them back into analog signals using a D/A converter and then pass them through an interface that converts the analog signals into sound or video.
Hearing the word “analog” may make it feel like an old technology, such as imagining cassette tapes or records, but there are many situations where analog signals are required. Just because digital technology emerged later does not mean analog is obsolete.
Conventionally, handling analog circuits required hardware knowledge and experience. However, since the advent of microcontrollers, low-cost and space-saving configurations using software have become possible.
In this way, analog signals and digital signals have different roles, and microcontrollers use a combination of both. By understanding the characteristics of each, you can gain a deeper understanding of how electronic devices process real-world information.


