Design Concepts of Hardware Abstraction Layer (HAL & BSP) Part Two

Design Concepts of Hardware Abstraction Layer (HAL & BSP) Part Two

1 BSP Design Example (Taking STM32 Hardware Platform as an Example) 2 Summary of Hardware Abstraction Layer Design 2.1 Key Points in Module Header File Design 1. Only include definitions of data types and descriptions of interface functions provided for external calls. 2. Generally, do not define variables or describe hardware-related resources, nor include any … Read more

Design Concepts of Hardware Abstraction Layer (HAL & BSP) in Embedded Systems (Part 1)

Design Concepts of Hardware Abstraction Layer (HAL & BSP) in Embedded Systems (Part 1)

1 Introduction The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the hardware circuitry, aimed at abstracting the hardware. It hides the hardware interface details specific to a platform, providing a virtual hardware platform for the operating system, making it hardware-independent and portable across various platforms. The HAL … Read more

Microcontroller Basic Assembly Language Programming Examples

Microcontroller Basic Assembly Language Programming Examples

1. Write a program to implement the logic function “P1.4=P1.0∨(P1.1∧P1.2)∨P1.3” using bit manipulation instructions. MOV C,P1.1 ANL C,P1.2 ORL C,P1.0 ORL C,P1.3 MOV P1.3,C 2. Write a program that jumps to the LABLE storage unit if the contents of accumulator A meet the following conditions. Assume the unsigned number is stored in A. (1) A≥10; … Read more

CC2530 LED Control Tutorial

CC2530 LED Control Tutorial

Introduction This sharing is just an entry-level tutorial for controlling an LED using the CC2530 microcontroller. As the first code tutorial in this Zigbee series, there are a few points to explain: This is my first time encountering Zigbee, so I will share while learning, and the sharing intervals will become uncertain. I am using … Read more

Understanding ADC and DAC

0 Introduction Before discussing Analog to Digital Converters (ADC) and Digital to Analog Converters (DAC), let’s first clarify what analog signals and digital signals are. Analog signals can be understood as physical quantities from the real world, but these quantities are electrical signals. For example, radio signals, etc. The characteristics of analog signals are that … Read more

Design of Dual STM32 Based Multirotor UAV Control System

Design of Dual STM32 Based Multirotor UAV Control System

Abstract: This paper proposes a design method and specific implementation plan for a control system based on dual STM32 chips. The control system uses two STM32F107VCT6 chips as master and slave controllers, communicating via a high-speed SPI interface to ensure real-time performance during the control phase. The hardware layout of the system is introduced, and … Read more

Comprehensive Practical Tutorial on 51 Microcontroller

Comprehensive Practical Tutorial on 51 Microcontroller

Course Details: This course mainly introduces the process, methods, techniques, and design concepts of 51 microcontroller application system development through typical examples, focusing on the system design of the 51 microcontroller, combining software and hardware in a simple and understandable manner. This book comprehensively explains various technologies in microcontroller development through 26 module examples, including … Read more

A Method for Dynamically Loading Functions in MCU

A Method for Dynamically Loading Functions in MCU

We have all heard of static libraries and dynamic libraries. Static libraries are quite familiar to everyone, especially in microcontroller development. Dynamic libraries, however, are rarely seen in the microcontroller field. Today, I would like to share a method for dynamically loading functions, which is somewhat similar to dynamic libraries. Project Address: printf("hello world!"); Introduction … Read more

Unique Features of STM32 Low-Power Timer (LPTIM)

Unique Features of STM32 Low-Power Timer (LPTIM)

When developing low-power products, we pay close attention to the overall power consumption of the system. So, have you looked into the LPTIM low-power timer? 1 Introduction In earlier years, the term LPTIM was rarely heard. With the increasing demand for low-power products, MCU manufacturers have introduced LPTIM timers aimed at low-power applications. Timers are … Read more

ZigBee and STM32 Smart Home Control System

ZigBee and STM32 Smart Home Control System

This is a very practical share that not only introduces the project’s functions but also provides reasons for doing so. At the end, it offers learning suggestions for everyone. 01 Project Introduction The prototype of this project was my undergraduate graduation project, built from scratch, including hardware schematics, PCB, component soldering, lower machine programming, upper … Read more