Using State Machines to Parse UART Variable-Length Protocol Frames

Using State Machines to Parse UART Variable-Length Protocol Frames

In communication design, considering the flexibility of protocols, they are often designed to be “variable length”. An example is shown in the figure below: the communication protocol frame of the Ruimi LoRa terminal.If a system receives the above “variable length” protocol frames, there will be a challenge — how to efficiently receive and parse them.To … Read more

QM UML State Machine Modeling Example: Blinky for Cortex-M0

QM UML State Machine Modeling Example: Blinky for Cortex-M0

Follow and star our official account for exciting content Source: Quanran Electronics Compiled by: Li Xiaoyao There are already many tutorials on the QP event state machine framework, and with the availability of Chinese version books, learning QP can be relatively quick. However, experienced engineers may be too busy with work to learn more technologies. … Read more

Embedded State Machine Programming – QP State Machine Framework

Embedded State Machine Programming - QP State Machine Framework

Content Source: Sun Wukong Seeking Knowledge Basic Terminology of State Machines Current State: Refers to the state currently being occupied. Condition: Also known as “event”, when a condition is met, it will trigger an action or execute a state transition. Action: The action executed after the condition is met. After the action is completed, it … Read more

Essential Learning for Embedded Development | Common Techniques for State Machines

Essential Learning for Embedded Development | Common Techniques for State Machines

Source:Embedded MiscellanyState machines are ubiquitous in embedded software. You might think, what’s so difficult about state machines? Aren’t they just switches? Switch is just the most basic point, and there are many more operations related to state machines that you may not have seen. Below, I will share several implementation methods. 1. Basic Terminology of … Read more

JTAG Debugging – TAP Controller

JTAG Debugging - TAP Controller

Implementing the TAP controller within the SoC, interfacing with the JTAG chip in the JTAG hardware box to receive and process JTAG sequences. Its main structure is as follows:As can be seen, there is a state machine, an Instruction Register (IR), several Data Registers (DR), a Bypass Register, etc.The state machine is controlled by TMS, … Read more

Various Techniques for State Machines in Embedded Systems

Various Techniques for State Machines in Embedded Systems

State machines are ubiquitous in embedded software, and you might say, what is so difficult about state machines? Aren’t they just switches? Switch is merely the most basic point; there are many more operations regarding state machines that you may not have encountered. Below, I will share several implementation methods. 1. Basic Terminology of State … Read more

Quick Troubleshooting Techniques for PLC-based Smart Home Systems Using PLCopen Standards

Quick Troubleshooting Techniques for PLC-based Smart Home Systems Using PLCopen Standards

Yesterday, a colleague called me in a panic, saying: “Wen, help! My PLC-based smart home system is completely down, and the owner is coming for acceptance in half an hour!” Hearing this familiar “fire-fighting” scenario made me smile. Ten years ago, I was in the same boat, where a small issue could drive me crazy … Read more

Creating Your Own Chip (Part 2) – UART Section

Creating Your Own Chip (Part 2) - UART Section

Word count: 1092, reading time approximately 6 minutes Continuing from the last session, today we will implement the functionality of UART, primarily using the hardware description language Verilog. The interface design is actually quite simple. If we distill its essence, it can be divided into three main parts: data acquisition, state machine, and interface timing. … Read more

Research on Control Algorithms of PLC Event-Driven Programming in Building Automation Control

Research on Control Algorithms of PLC Event-Driven Programming in Building Automation Control

Yesterday, I received a request for help from a colleague who said that the intelligent building automation system he was responsible for was always “misbehaving”—the corridor lights would turn on and off unpredictably, and the conference room air conditioning was fluctuating between hot and cold. I immediately recognized that this was the fault of the … Read more

Variable Types and Data Processing in PLC Sequential Control Programming

Variable Types and Data Processing in PLC Sequential Control Programming

Over the years, I have seen too many on-site programs, especially in the area of PLC sequential control, where the choice of variable types is poor, leading to numerous pitfalls. A few days ago, I went to a food factory to troubleshoot, and the program almost drove me crazy. They used a bunch of BOOL … Read more