28 PLC Programming Standards and Recommendations from an Experienced Engineer

28 PLC Programming Standards and Recommendations from an Experienced Engineer

The Design Requirements for a Perfect PLC Program A complete PLC program is not just about making the system operational; it also requires comprehensive comments, excellent architecture, good scalability, a complete alarm protection system, and a simulation system before operation. 1. Simplicity Keep the PLC program as simple as possible. Simplicity means using standardized program … Read more

Experiment: Software Design for External Interrupts with Buttons

Experiment: Software Design for External Interrupts with Buttons

15.3.2 Software Design 15.3.2.1 Create New Project For e2studio Development Environment Copy our previous e2s project “11_GPIO_LED“, then rename the project folder to “16_ICU_External_IRQ“, and finally import it into our e2studio workspace. For Keil Development Environment Copy our previous Keil project “11_GPIO_LED“, then rename the project folder to “16_ICU_External_IRQ“, and double-click the Keil project file … Read more

Class Inheritance in Python: From ‘Child Inheriting Parent’s Business’ to ‘Open-Closed’ Programming Philosophy

Class Inheritance in Python: From 'Child Inheriting Parent's Business' to 'Open-Closed' Programming Philosophy

In the programming world of Python 3.12, class inheritance has long transcended the superficial understanding of “subclass reusing parent class code” and evolved into a deep architecture that embodies software design principles, type system constraints, and code evolution capabilities. This article will reveal five core dimensions of class inheritance in the context of Python 3.12, … Read more

Why C++ Experts Secretly Avoid Using const Members: The Reasons Are Beyond Your Imagination!

Why C++ Experts Secretly Avoid Using const Members: The Reasons Are Beyond Your Imagination!

Click the “C++ Players, please get ready” below, select “Follow/Pin/Star the public account” for valuable content and benefits, delivered to you first! Recently, some friends mentioned they did not receive the daily article push, which is due to WeChat changing its push mechanism, causing those who did not star the public account to miss the … Read more

Software Design

Software Design

15.3.2 Software Design 15.3.2.1 Create a New Project For the e2 studio development environment: Copy our previous e2s project“11_GPIO_LED”, then rename the project folder to“16_ICU_External_IRQ”, and finally import it into our e2 studio workspace. For the Keil development environment: Copy our previous Keil project“11_GPIO_LED”, then rename the project folder to “16_ICU_External_IRQ”, and double-click the Keil … Read more

Why Fewer Global Variables are Better in Embedded C Programming

Why Fewer Global Variables are Better in Embedded C Programming

Embedded development, especially in os-less microcontroller programs, often suffers from the rampant use of global variables.This phenomenon is common among programmers transitioning from early assembly language and beginners, who tend to treat global variables almost like function parameters.They define numerous chaotic structures in .h files, declare a bunch of externally visible global variables that are … Read more

The Copy Elimination Before C++11: Can Privatization Truly Prevent Copying?

The Copy Elimination Before C++11: Can Privatization Truly Prevent Copying?

Creating content is not easy, if convenient, please click to follow, thank you. Click on “C++ Players, please get ready” below, select “Follow/Pin/Star the public account” for valuable content and benefits, delivered to you first! Recently, some friends said they did not receive the articles pushed on the same day, which is due to WeChat … Read more

Wild Techniques Every Embedded Development Veteran Knows to Avoid Three Years of Detours!

Wild Techniques Every Embedded Development Veteran Knows to Avoid Three Years of Detours!

Today, I want to share some “unconventional” yet extremely useful tricks in embedded development that seasoned veterans rarely disclose! First Technique: Hardware Issues? Pass the Buck First!If you encounter a program crash, don’t rush to modify the code! First, check if the hardware layout matches the schematic. Our project was delayed last time because a … Read more

Making Embedded Systems: Preface

Making Embedded Systems: Preface

Preface:I love embedded systems. The first time a motor turned because I told it, I was hooked. I quickly moved away from pure software and into a field where I can touch the world. Just as I was leaving software, the seminal work was done on design patterns. I love embedded systems. The first time … Read more

Understanding Cohesion and Coupling in C Language Programs

Understanding Cohesion and Coupling in C Language Programs

Click the above blue text to follow C Language Chinese Community Source: CSDN 1. Principles Low coupling refers to making modules as independent as possible. While it is impossible for modules to have no connections, the interfaces between modules should be minimized and simplified. Thus, high cohesion from the perspective of the internal characteristics of … Read more