Embedded – Simulated SPI Controller Program

Embedded - Simulated SPI Controller Program

The following is an example program that simulates an SPI (Serial Peripheral Interface) bus controller using the C language, implementing the functionality of SPI through simulated GPIO pin operations, including initialization, sending bytes, and receiving bytes. This example is suitable for general microcontroller platforms, and the GPIO operation code needs to be modified according to … Read more

Detailed Explanation of C Language Enum Types

Detailed Explanation of C Language Enum Types

1. Core Features of Enum Types 1.1 Basic Definition and Underlying Principles The enum type is defined using the <span>enum</span> keyword to create a set of named integer constants, essentially assigning semantic names to integer values. The standard syntax is: enum EnumName {Element1, Element2, …}; Each enum element automatically increments from 0 by default, for … Read more

The Game of Thrones in C: How to Rule the Kingdom of Pointers with const

The Game of Thrones in C: How to Rule the Kingdom of Pointers with const

1. The Basic Relationship Between const and Pointers In C, the combination of the const keyword with pointers can create a powerful type safety protection mechanism. Depending on the position of const, four different pointer types can be generated: int a = 10; int b = 20; // 1. Pointer to a constant const int … Read more

Unveiling ARM Cortex-M Startup: From Power-On to Your main() Function

Unveiling ARM Cortex-M Startup: From Power-On to Your main() Function

Today, let’s delve into a seemingly basic yet often overlooked topic — what exactly happens from the moment you press the reset button until your <span>main()</span> function begins execution? Overview of the Startup Process: The Journey of System Awakening Imagine your MCU as a robot just awakened. It needs to get dressed (load the stack), … Read more

Yaskawa Robot Current Position Output Register

Yaskawa Robot Current Position Output Register

Application: Retrieve the robot’s current position to display on a touchscreen,IOT platform, etc., for data presentation. Function Introduction: Outputs the robot’s current vertical intersection position (base coordinate value) to a specified buffer. Method 1: Robot’s Current Vertical Intersection Position [Unit:mm], [Unit:deg] 1, Flip to find settings, parameter-S1CxG 2, Enable function parameter Set parameterS1C1G208=1, the output … Read more

Why High Salary Offers in Embedded Development Go to Others

Why High Salary Offers in Embedded Development Go to Others

Why High Salary Offers in Embedded Development Go to Others Question Today, let’s discuss a question that everyone is concerned about:How can I secure a high salary offer?Working hard is certainly not just for money, and money is not the only measure of our contributions. However, you must admit that how much money you make … Read more

HarmonyOS Device Virtualization Technology: Transforming Your Phone into a Smart Home Hub

HarmonyOS Device Virtualization Technology: Transforming Your Phone into a Smart Home Hub

Is your phone just a phone? No! In the world of HarmonyOS, it can become much more. Today, let’s discuss the device virtualization technology of HarmonyOS, a cutting-edge technology that allows your phone to instantly transform into a smart home control center, managing your home’s lights, curtains, and refrigerator—all without the need to purchase expensive … Read more

What GUI to Use for Arm-2D?

What GUI to Use for Arm-2D?

[Continuing from Last Time] Last time we discussed: Arm-2D is a GUI toolkit for microcontrollers with limited resources, and we systematically introduced how to deploy the Arm-2D library in an MDK project, further explaining how to use the PFB Helper to achieve “infinitely variable speed” between “frame rate and RAM usage”. Today, we will continue … Read more

Understanding JTAG Debugging and CMSIS-DAP

Understanding JTAG Debugging and CMSIS-DAP

CMSIS-DAP (Cortex Microcontroller Software Interface Standard – Debug Access Port) is a debug interface standard defined by ARM. In the introduction to JTAG debugging – DAP, it mentions that an implementation of ARM ADI is called DAP, so does CMSIS-DAP with the DAP suffix mean it is an implementation of DAP? See the diagram from … Read more

Introduction to JTAG Debugging and SWD

Introduction to JTAG Debugging and SWD

SWD stands for Serial Wire Debug Interface. Sometimes you may encounter terms like: JTAG-DP, SW-DP, SWJ-DP, which are interfaces for external hardware boxes. Among them, SWJ-DP was added in ADI v6.0:In summary: Physical Interface JTAG Interface? SWD Interface? Specification JTAG-DP Yes ADI v5.0/v6.0 SW-DP Yes ADI v5.0/v6.0Serial Wire (Serial Interface) SWJ-DP Yes Yes ADI v6.0Serial … Read more