How Many Pins Does STM32 Have? Why Can One Pin Serve Multiple Functions?

How Many Pins Does STM32 Have? Why Can One Pin Serve Multiple Functions?

πŸ”Œ How Many Pins Does STM32 Have? Why Can One Pin Serve Multiple Functions? Almost all beginners with STM32 will be confused: πŸ‘‰ How many pins does STM32 actually have?πŸ‘‰ Are pin 0 of GPIOA and pin 0 of GPIOB duplicated?πŸ‘‰ Why can one pin have multiple functions without conflict? Let’s clarify this systematically and … Read more

Basics of Device Tree (Part 4): Common Device Descriptions

Basics of Device Tree (Part 4): Common Device Descriptions

1. I2C Devices 1.1 I2C Controller Description of the I2C bus controller node: i2c0: i2c@10002000 { compatible = "arm,versatile-i2c"; reg = <0x10002000 0x1000>; interrupts = <0 30 4>; #address-cells = <1>; #size-cells = <0>; clocks = <&osc24M>; clock-frequency = <100000>; /* 100KHz standard mode */ status = "okay"; }; Key Attribute Descriptions: <span>#address-cells = <1></span>: … Read more

Discussing C Programming – Bit Manipulation of STM32 GPIO Registers (Revised)

Discussing C Programming - Bit Manipulation of STM32 GPIO Registers (Revised)

This code encapsulates the bit manipulation of STM32F2 series GPIO registers using unions and macros. The core design utilizes the RegSet union to facilitate convenient access to 32-bit registers and individual bits, while macros simplify the register address mapping for different GPIO ports (A-I). Below is the formatted code and an analysis of the calling … Read more

Direct GPIO Driver for OV7670 Camera without FIFO using STM32F103

Direct GPIO Driver for OV7670 Camera without FIFO using STM32F103

In the previous article, I documented how I used the STM32F103 to light up the ILI9341 LCD using the SPI protocol. This time, we plan to use the same microcontroller to drive the OV7670 camera and display it on the LCD, but ultimately we did not fully succeed. The camera test pattern can be displayed … Read more

Fundamentals of C Language Applications: Understanding QSPI Communication

Fundamentals of C Language Applications: Understanding QSPI Communication

Overview: This article mainly discusses the basic principles of QSPI communication, an upgraded version of SPI communication. It aims to help readers understand and apply the QSPI data transmission method. This article is a sister piece to my previous article on SPI communication, which interested readers can refer to first: Fundamentals of C Language Applications … Read more

Differences Between Raspberry Pi and Microcontrollers

Differences Between Raspberry Pi and Microcontrollers

The Raspberry Pi is a microcomputer based on the ARM architecture, equipped with a complete operating system and strong computing capabilities, suitable for running complex applications; while a microcontroller is an integrated processor, memory, and I/O interface, typically running bare metal or real-time operating systems, focusing on real-time control and simple task processing. There are … Read more

Light Up Your First FPGA Project

Light Up Your First FPGA Project

Light Up Your First FPGA Project: A Blinking LED When you see the small light on the circuit board start to blink regularly, it means your FPGA program is truly “alive”! Below, we will guide you step by step to achieve this ceremonial introductory experiment. 1. πŸ”Œ Hardware Preparation Connect the Development Board Insert the … Read more

Microcontroller Handheld Game Console (Part 10) β€” Hardware Preparation for Running Game Boy Emulator on ESP8266

Microcontroller Handheld Game Console (Part 10) β€” Hardware Preparation for Running Game Boy Emulator on ESP8266

The Game Boy emulator running on the ESP8266 is part of a project from ESPboy. https://github.com/ESPboy-edu/ESPboy_GameBoy ESPboy uses the ESP8266 as the processor and employs an I2C chip to expand GPIO for controlling the Game Boy, as the usable IO on the ESP8266 is quite limited. It uses an ST7735 LCD with a resolution of … Read more

Is It Possible to Learn Microcontrollers Without Learning Registers?

Is It Possible to Learn Microcontrollers Without Learning Registers?

Recently, a student asked me: “Teacher, with the STM32 HAL library being so user-friendly, is it unnecessary to learn about registers? Isn’t it faster to just call library functions?” This statement sounds reasonable. Indeed, the standard libraries and HAL libraries are very powerful, encapsulating the operations of the underlying registers. So, is it possible not … Read more

Smart Lock System Based on STM32: Lock Control

Smart Lock System Based on STM32: Lock Control

This section marks the beginning of our project, hardware groundwork. To start this project, I also need to learn about the hardware part, as both are indispensable.This collection is my study of hardware, recording some basics, taking it slow.Now let’s start our project.Here we use a motor to act as a door lock switch (the … Read more