PWM stands for Pulse-Width Modulation. Once the switching frequency (fsw) has been chosen, the ratio between the switch-on time (TON) and the switch-off time (TOFF) is varied. This is commonly called duty-cycle (D). The duty cycle can be between 0 and 1 and is generally expressed as a percentage (%).
D = TON / (TON + TOFF) = TON x fsw
<img src="https://images.theengineeringprojects.com/image/main/2021/12/1-12.jpg" alt="Overview, PWM signal generation through timer in STM32, STM32 configuration with STCube, Basic configuration, Timer 2 configuration, The initializat ...
<img src="https://images.theengineeringprojects.com/image/main/2021/12/18-4.jpg" alt="Overview of DAC, DAC on STM32 platform, DAC in manually mode, Configuration of DAC in manual mode, Diving into the initialization code, Driving DAC to generate a reference voltage, Using DAC in data memory access (DMA) mode with a timer, Sinewave generation" class="alignCenter" width="300" height="193"
srcset="https://images.theengineeringprojects.com/image/300/2021/12/18-4.jpg 300w, https://images.theengineeringprojects.com/image/600/2021/12/18-4.jpg 600w" sizes="(ma ...
An Analog to Digital Converter (ADC) converts a continuous signal (usually a voltage) into a series of discrete values ??(sequences of bits). The main features are:
Resolution (in analog terms): It is the minimum variation of the analog input voltage that can determine the variation of the LSB, that is of the least significant bit of the output code. Since the quantization step Q corresponds to the LSB, it can be said that the resolution coincides with the quantization step Q (and therefore is measured in Volts). We can say that the quantization step Q corresponds to the LSB because two c ...
The SPI (Serial Peripheral Interface) protocol, or rather the SPI interface, was originally devised by Motorola (now Freescale) to support their microprocessors and microcontrollers. Unlike the I2C standard designed by Philips, the SPI interface has never been standardized; nevertheless, it has become a de-facto standard. National Semiconductor has developed a variant of the SPI under the name Microwire bus. The lack of official rules has led to the addition of many features and options that must be appropriately selected and set in order to allow proper communication between the various inte ...
EEPROMs (Electrically Erasable Programmable Read-Only Memories) allow the non-volatile storage of application data or the storage of small amounts of data in the event of a power failure. Using external memories that allow you to add storage capacity for all those applications that require data recording. We can choose many types of memories depending on the type of interface and their capacity.
EEPROMs are generally classified and identified based on the type of serial bus they use. The first two digits of the code identify the serial bus used:
Parallel: 28 (for example 28C512) much used ...
Hello friends, I hope you all are doing great. In today's lecture, we will have a look at the I2C Communication with STM32 Microcontroller board. I am going to use the Nucleo board for today's lecture. In the previous lecture, we have discussed STM32 Serial communication both in Interrupt Mode and polling Mode. Today, we will study another way of communication(i.e. I2C) with STM32. So, let's first have a look at what is I2C Communication:
What is I2C Communication?
I²C (Inter-Integrated Circuit) is a two-wire serial communication system used between integrated circuits. Like any serial protoc ...
USART is the acronym for Universal Synchronous-Asynchronous Receiver-Transmitter, and is the advancement of the old UART that was unable to handle synchronous communications; in computers, it deals with the management of communication via the RS-232 interface.
Generally, in the communication between devices, there is a transmitter and receiver that can exchange data bidirectionally, thus it happens for example in the communication between the microcontroller and third-party peripherals.
<img src="https://images.theengineeringprojects.com/image/main/2021/11/1-7.jpg" ...
We will use for our examples STM32CubeIDE released by ST and completely free. STM32CubeIDE is a development tool and supports multi operative system (SO), which is part of the STM32Cube software ecosystem. STM32CubeIDE allows using a single platform to configure peripherals, to generate/compile/debug the code for STM32 microcontrollers and microprocessors. The framework used is Eclipse®/CDT, as tool-chain for the development is used GCC toolchain and GDB for the debugging.
<img src="https://images.theengineeringprojects.com/image/main/2021/10/GCC-toolchain.png" alt ...
To become familiar with the world of microcontrollers it is necessary to have a development board (also known as a kit), which generally allows you to start working on it easily. Fortunately, the ST provides a wide portfolio of development boards. In this guide, we will describe and use the Nucleo board.
The Nucleo has been introduced a few years ago and its line is divided into three main groups:
Nucleo-32;
Nucleo-64;
Nucleo-144.
<img src="https://images.theengineeringprojects.com/image/main/2021/10/Nucleo-Development-Board.png" alt="Introduction to STM32 ...
<img src="https://images.theengineeringprojects.com/image/main/2021/10/STM32-Family.png" alt="Introduction to STM32 Microcontrollers, STM32 Family, STM32 Mainstream, STM32 Ultra-Low-Power, STM32 High-Performance, STM32 Wireless, The Nucleo Development Board, STM32 Nucleo-64 parts, STM32 Nucleo-64 connectors, Setting-Up the Tool-Chain, First Project in STM using STM32CubeIDE, Blinking LED, Steps to generate the config. files from STM32CubeMX, Creating a new STM32CubeMX project, User Code Blinking Led, Data type C programs" class="alignCenter" width="141" height="300" ...