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

Detailed Analysis of KEIL C51 Code Optimization

Detailed Analysis of KEIL C51 Code Optimization

In-depth analysis of Keil C51 bus peripheral operation issues. 1 Problem Review and Analysis In actual work, encountering repeated consecutive reads of the same port, the Keil C51 compiler did not achieve the expected results. Analyzing the assembly program generated by the C compiler found that the second read statement of the same port was … Read more

Resolving Link Errors in Keil Compilation

Resolving Link Errors in Keil Compilation

Using Keil MDK, I tried an example for STM32F107. After opening and compiling, the compilation succeeded, but the linker indicated that there were 5 functions undeclared. However, upon reviewing the files, it was clear that the header files were included. Why was it still not working? I also tried using extern declarations, but that did … Read more

Effective Approaches for Rust Newcomers

Effective Approaches for Rust Newcomers

Mozilla RustThe official team provides an extensive and high-quality eBook and technical documentation, which is enough for us to read directly.Moreover, I guarantee you won’t finish it because they are continuously updated with newrust versions, and occasionally there are new books on specific topics (for example, async programming, macros, cargo book, rustc book, etc.).I feel … Read more

Essential Skills for Linux Experts: A Comprehensive Guide to Environment Variables

Essential Skills for Linux Experts: A Comprehensive Guide to Environment Variables

Linux | Red Hat Certified | IT Technology | Operations Engineer 👇 Join the 1000-person technical communication QQ group. Note: [Public Account] for faster approval 1. Basic Concepts Environment variables (environment variables) generally refer to parameters used to specify the operating environment of the operating system. For example: when we write C/C++ code, we never … Read more

Implementing Partial Screen Clear on LCD

Implementing Partial Screen Clear on LCD

Graphic Control Uncle Composition conveys ideas Reading has never been this easy!!! 01 Introduction When developing multifunctional applications for an LCD screen, there are times when you need to clear the screen. Clearing can be done in two ways: full screen clear and partial screen clear. Today, I will document the code for partial screen … Read more

Comprehensive Guide to Microcontroller Units

Comprehensive Guide to Microcontroller Units

MCU stands for Microcontroller Unit, which is commonly known as a single-chip microcontroller. It reduces the CPU’s frequency and specifications appropriately and integrates memory, counters, USB, A/D conversion, UART, PLC, DMA, and other peripheral interfaces, even LCD driver circuits, into a single chip, forming a chip-level computer. This allows for different combinations of control for … Read more

Simulating Standard UART Serial Port Using General I/O Ports

Simulating Standard UART Serial Port Using General I/O Ports

Frame The UART communication standard uses an 8-bit binary number as a frame, with the least significant bit first, transmitted bit by bit. To distinguish each frame, a 0 is used as a start marker before each frame, followed by a 1 as a stop marker. Before the stop marker, an optional “parity bit” can … Read more

Microcontroller Program to Control Stepper Motor

Microcontroller Program to Control Stepper Motor

Combining the key input program, we designed a functional program: Pressing the number keys 1 to 9 controls the motor to rotate 1 to 9 circles; using the up and down keys changes the rotation direction, pressing the up key rotates forward 1 to 9 circles, while the down key rotates backward 1 to 9 … Read more