Implementing Modbus Protocol for Communication Between Microcontrollers and PLCs

Implementing Modbus Protocol for Communication Between Microcontrollers and PLCs

1. Introduction The HMI (Human-Machine Interface) is increasingly used in industrial automation systems and devices due to its small size, high performance, and strong real-time capabilities. It features various displays such as letters, Chinese characters, graphics, and images, with a simple and user-friendly interface. Equipped with long-lasting membrane button keyboards, it is easy to operate. … Read more

Thoughts on Serial Communication Design with 51 Microcontroller

Thoughts on Serial Communication Design with 51 Microcontroller

Recently, I needed to use the 51 microcontroller for some control tasks in a project. The main function is to receive commands from the host computer through the serial port, analyze and decode them, and wait for an external trigger signal to execute the previously received command actions. Fortunately, I had an STC89C52 on hand, … Read more

Solving USB to TTL Board Programming and Serial Debugging Issues for STC

Solving USB to TTL Board Programming and Serial Debugging Issues for STC

Problem: I used a USB to TTL board to program the STC89C52RC microcontroller. I connected the board’s RX to the microcontroller’s TX (P3.1), the board’s TX to the microcontroller’s RX (P3.0), and GND to GND. After making the connections, I couldn’t download the program, and I kept receiving the prompt “Please power on the MCU.” … Read more

Programming STM32 Microcontroller via ISP

Programming STM32 Microcontroller via ISP

Click the above “Easy Learning Electronics” to follow us with one click and easily learn electronic knowledge. Easy Learning Electronics Subscription Daily updates on electronic industry technical articles and the latest microcontroller news, learn easily anytime, anywhere. Students may encounter fewer issues, but when starting work in software development, various “unimaginable” problems may arise. However, … Read more

Using RST in SWD Debugging Port

Using RST in SWD Debugging Port

1. Introduction In the development of STM32 microcontrollers, using SWD for program downloading only requires two pins. So, when do we need to use the microcontroller’s RST port? This involves the pin configuration of the microcontroller. In the CubeMX software configuration, there are five options regarding system debugging settings. If you choose SWD debugging, you … Read more

Tips for Parameter Storage in Embedded Devices

Click on the “Embedded Application Research Institute” above, select “Pin/Star the Official Account“ Practical Benefits, Delivered First-Hand! Source | CSDN Passing Bear Compiled & Formatted | Embedded Application Research Institute 1. Introduction Those involved in embedded product development must have encountered the need to save device parameters. A common approach is to manage parameters using … Read more

Using Noinit Section and Variable Allocation at Specified Addresses in IAR

Using Noinit Section and Variable Allocation at Specified Addresses in IAR

The noinit section is familiar to most of us developers working with microcontrollers. If this section is used, it will be automatically allocated by the compiler to a region in the chip’s SRAM (note that it is in the RAM area, not Flash). Variables defined in this section will not be re-initialized during any chip … Read more

Considerations for Using IAR Development Environment with AVR Microcontroller

Considerations for Using IAR Development Environment with AVR Microcontroller

Header File Meanings avr_macros.h includes simplified writing for reading and writing 16-bit registers, along with several bit manipulation functions. comp_a90.h provides brief writing for a large number of intrinsic functions. ina90.h includes the “inavr.h” and “comp_A90.h” files. intrinsics.h provides intrinsic functions that offer the simplest operations for handling the processor’s low-level features: sleep, watchdog, FLASH … Read more

Using VSPD, Serial Debug Assistant, and Keil for Serial Debugging

Using VSPD, Serial Debug Assistant, and Keil for Serial Debugging

Below is a detailed introduction on how to use virtual serial ports to debug serial sending and receiving programs. Three software programs are needed: KEIL, VSPD XP5 (virtual serial ports driver xp5.1), and Serial Debug Assistant (I personally find version 2.1 quite user-friendly). 1. First, compile the written program in KEIL. 2. Open VSPD, the … Read more