MicroPython: The Mini Power of Embedded Systems!

MicroPython: The Mini Power of Embedded Systems!

▼ Click the card below to follow me ▲ Click the card above to follow me MicroPython is a lightweight Python interpreter designed specifically for embedded systems. Its emergence allows us to run Python code on microcontrollers, opening another window to the world of hardware. Imagine being able to control an LED, read sensor data, … Read more

Part 2 of Smart Home Project: Using LCD Screens

Part 2 of Smart Home Project: Using LCD Screens

This image was generated by AI For project use, I won’t discuss the specific principles here. Let’s directly introduce the interface. BL—————-》Backlight pin CS—————-》Chip select pin DC—————-》Command pin RST—————》Reset pin SDA—————》Data pin SCL—————》Clock line VCC—————》Power pin GND—————》Ground pin BL: Backlight pin, there are two common ways to set it, one is to supply power directly … Read more

STM32 vs Arduino: Why Won’t Your LED Light Up?

STM32 vs Arduino: Why Won't Your LED Light Up?

Received feedback from many readers: “Clearly following the tutorial, but the STM32 board’s LED won’t light up?” This phenomenon hides hardware differences in embedded development that are easily overlooked, the connection method of the onboard LED and GPIO pins, is the most common “pitfall” for beginners transitioning from Arduino to STM32. Every line of code … Read more

Why Use Open-Drain Output and Pull-Up Resistors in I2C?

Why Use Open-Drain Output and Pull-Up Resistors in I2C?

Why do we need pull-up resistors in I2C? Because it uses open-drain output. Why is it open-drain output? The I2C protocol supports multiple master devices and multiple slave devices on a single bus. If push-pull output is used instead of open-drain output, it could lead to short circuits between master devices. Therefore, the bus generally … Read more

The Secret of Microcontroller GPIO Driving Capability: Why ‘Sinking’ is More Powerful than ‘Sourcing’?

The Secret of Microcontroller GPIO Driving Capability: Why 'Sinking' is More Powerful than 'Sourcing'?

In embedded system design, we often need to use the General Purpose Input/Output (GPIO) pins of microcontrollers (MCUs) to drive peripheral devices such as LEDs and relays. I still remember that my first code in college was to control the blinking of an LED using the 8051 microcontroller. I wonder if the current university courses … Read more

Detailed Explanation of GPIO Operations for 32-bit Microcontrollers

Detailed Explanation of GPIO Operations for 32-bit Microcontrollers

32 Single Chip Microcontroller I O When it comes to the IO of the 32-bit microcontroller, taking the F1 series as an example, we first need to mention: 1 initialization function: void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct); 2 functions to read input levels: uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin); uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx); 2 functions to read output … Read more

C++ Embedded Development: Basics and Practices of Hardware Programming

C++ Embedded Development: Basics and Practices of Hardware Programming

C++ Embedded Development: Basics and Practices of Hardware Programming Introduction With the rapid development of the Internet of Things and smart devices, the demand for embedded systems is increasing. C++, as an efficient and flexible programming language, is widely used in embedded development. This article will introduce the basic concepts of C++ in embedded development, … Read more

Adding FINSH Console to FreeRTOS

Adding FINSH Console to FreeRTOS

1 FINSH ConsoleWith the console, we can reduce trial and error costs when debugging hardware, change PID parameters in real-time without needing to reprogram, and customize commands to call serial API for testing communication protocols. This article summarizes the entire porting process.2 Preparation Before Porting2.1 Testing EnvironmentThis test is an extension based on the io_toggle … Read more

Common Communication Interfaces II (Principles and Differences of CAN, I2C, SPI, UART, GPIO)

Common Communication Interfaces II (Principles and Differences of CAN, I2C, SPI, UART, GPIO)

The previous article organized common communication interfaces I (RS232/RS485/USB/TYPE-C principles and differences), and in this article, we continue to organize the principles and differences of CAN, I2C, SPI, UART, and GPIO. 1.CAN Bus Interface 1)Definition CAN stands for Controller Area Network, developed by the German company BOSCH, known for its research and production of automotive … Read more

Applications of C Language in Embedded Systems: Hardware Interface Programming

Applications of C Language in Embedded Systems: Hardware Interface Programming

Applications of C Language in Embedded Systems: Hardware Interface Programming Introduction The C language is a widely used programming language, especially significant in embedded system development. Its efficiency and direct control over hardware make C the preferred choice for embedded developers. In this article, we will explore how to use C for hardware interface programming … Read more