Microcontroller Basics and Applications: Serial Expansion

Microcontroller Basics and Applications: Serial Expansion

Click the blue text to follow us 1. Overview of Microcontroller Serial Expansion The methods for implementing microcontroller serial expansion include commonly used serial bus standards such as: I2C bus, Serial Peripheral Interface (SPI), and Universal Serial Bus (USB). This chapter will focus on the I2C bus. 1. Implementation through dedicated serial standard bus (1) … Read more

How to Output Analog Signals via Microcontroller UART?

How to Output Analog Signals via Microcontroller UART?

1. Introduction In electronic circuit design, there might be a situation where the microcontroller has no DAC resources and no spare PWM ports available. The only remaining option is a UART. So how can we output an analog voltage through this port? By using the microcontroller’s port, we can output a square wave signal with … Read more

STM32CubeMX Configuration for STM32F103C8Tx UART Data Manager

STM32CubeMX Configuration for STM32F103C8Tx UART Data Manager

Introduction Since both the Arduino controlling the lead screw and the board controlling the servo only have one UART, they need to communicate with each other, and also with the Raspberry Pi. Therefore, the number of UARTs is insufficient. Thus, I created a UART Data Manager using the STM32F103 chip, which has three UARTs: USART1~3. … Read more

An Overview of UART Modes in STM32

An Overview of UART Modes in STM32

Click the blue text to follow us 0. Introduction: Computer communication is divided into serial communication and parallel communication. Parallel communication: Typically transmits data bytes simultaneously using multiple data lines. Serial communication: Transmits data bytes one bit at a time over a single transmission line. Each has its own advantages and disadvantages: Parallel communication: Simple … Read more

Building STM32 F103C8T6 System Board Download Circuit Tutorial

Building STM32 F103C8T6 System Board Download Circuit Tutorial

1. What is a Download Circuit The download circuit of a microcontroller refers to the hardware circuit used to download the written program (firmware) to the internal memory of the microcontroller. This process is often referred to as programming or flashing. The download circuit includes the debugging interface with the microcontroller and the corresponding circuit … Read more

STM32CubeIDE Tutorial: Configuration Process

STM32CubeIDE Tutorial: Configuration Process

Click the blue text to follow us 0 Preface: Previously, we learned about STM32CubeIDE and provided the official download link for STM32CubeIDE. This time, we will share the basic configuration required for STM32 projects in STM32CubeIDE, including the configuration of the UART peripheral. 1. Download link for STM32CubeIDE: https://www.st.com/zh/development-tools/stm32cubeide.html Note: The image indicates a Windows … Read more

Designing High Load UART Communication with STM32

Designing High Load UART Communication with STM32

1 Introduction Direct Memory Access (DMA) is a component used by the CPU to “move” (copy) data from one address space to another without CPU intervention during the data copying process. The CPU is notified once the data copying is complete. As a result, using DMA can free up CPU resources when copying large amounts … Read more

Understanding STM32 Serial Communication

Understanding STM32 Serial Communication

Introduction to Serial Communication Classification Based on Data Transmission Direction Simplex: Data transmission only supports data transfer in one direction. Half-Duplex: Allows data to be transmitted in both directions. However, at any given time, data can only be transmitted in one direction, which is essentially a switched direction simplex communication; it does not require separate … Read more

20 Commonly Used STM32 MCU Library Functions

20 Commonly Used STM32 MCU Library Functions

The development of STM32 microcontrollers relies heavily on their powerful library function support. These library functions provide developers with a unified interface, simplifying the operation of low-level hardware, improving development efficiency and the reliability of programs. Below we will share 20 commonly used library functions for STM32 microcontrollers. 1. GPIO Initialization Function void HAL_GPIO_Init(GPIO_TypeDef* GPIOx, … Read more

Basic Principles of STM32 Serial Communication

Basic Principles of STM32 Serial Communication

Background Knowledge of Communication Interfaces Ways of Communication Between Devices Generally, the communication methods between devices can be divided into parallel communication and serial communication. The differences between parallel and serial communication are shown in the table below. Classification of Serial Communication 1. According to the direction of data transmission, it can be divided into: … Read more