Understanding UART Serial Communication

Understanding UART Serial Communication

UART stands for Universal Asynchronous Receiver/Transmitter, also known as serial communication. Unlike communication protocols like SPI and I2C, it is a physical circuit within microcontrollers or an independent IC. The main purpose of UART is to send and receive serial data, and its greatest advantage is that it uses only two wires to transmit data … Read more

Comprehensive Introduction to UART, SPI, and I2C Protocols

Comprehensive Introduction to UART, SPI, and I2C Protocols

I2C Communication Protocol Basics 3.1 Communication Overview I²C (Inter-Integrated Circuit) is a serial communication bus designed by Philips in the early 1980s. It facilitates communication between motherboards, embedded systems, or mobile phones and peripheral devices. Due to its simplicity, it is widely used for communication between microcontrollers and sensor arrays, displays, IoT devices, EEPROMs, etc. … Read more

Essential Microcontroller Programming: Understanding Circular Queues and Message Queues

Essential Microcontroller Programming: Understanding Circular Queues and Message Queues

Follow+Star Public Account Number, don’t miss exciting content Author | strongerHuang WeChat Public Account | Embedded Column In the process of microcontroller development, the “message queue” is often used, and there are various implementation methods.This article shares the principles and mechanisms of queue implementation. Circular Queue The circular queue is a very useful data structure … Read more

Five Key Considerations in Embedded Microcontroller Programming

Five Key Considerations in Embedded Microcontroller Programming

During the process of microcontroller programming, if a designer can master multiple programming languages simultaneously, then this designer is certainly a very talented individual. However, it is quite challenging to be proficient in Assembly, C, and C++ at the same time. Many beginners encounter obstacles while learning even one of these languages, leading to frustration. … Read more

Using Switch Statement in C Programming for Microcontrollers

Using Switch Statement in C Programming for Microcontrollers

The C language also provides another way for multi-branch selection using the switch statement, which has the general form:switch(expression){ case constant_expression1: statement1; case constant_expression2: statement2; … case constant_expressionn: statementn; default: statementn+1;}The semantics are: calculate the value of the expression. Then compare it one by one with the subsequent constant expression values. When the value of … Read more

Microcontroller C Language Programming Insights

Microcontroller C Language Programming Insights

Wu Jianying Microcontroller Development Board Address Taobao Store:【Wu Jianying’s Shop】 Address:【https://item.taobao.com/item.htm?_u=ukgdp5a7629&id=524088004171】 During the process of creating this 8*8 key program, whether writing my own or referencing others’ programs, I found that I lacked understanding of some basic concepts and programming standards in C language. Some issues stemmed from poor programming habits, while others were a … Read more

18 Q&A on Basic Microcontroller Programming Knowledge

18 Q&A on Basic Microcontroller Programming Knowledge

1. What are the advantages and disadvantages of C language and assembly language in microcontroller development? Answer: Assembly language is a symbolic language that uses mnemonic words to represent machine instructions, making it the closest language to machine code. Its main advantages are low resource usage and high execution efficiency. However, assembly languages may differ … Read more

Comparing Programming Methods of 51 and STM32 Microcontrollers

Comparing Programming Methods of 51 and STM32 Microcontrollers

STM32 and 51 microcontrollers are two common series of microcontrollers, which differ in hardware architecture, performance characteristics, and programming methods. However, from the perspective of C language programming, I believe they are quite similar. Let’s compare their programming characteristics: 51 & STM32 STM32: STM32 is a 32-bit microcontroller based on the ARM Cortex-M core, featuring … Read more

Mastering Const in Microcontroller Programming

Mastering Const in Microcontroller Programming

Click the blue text above Follow us! The const keyword in C is crucial, and today we will delve into the definition and practical applications of const so that it is no longer a mystery. In C, the const keyword is an abbreviation for constant, meaning it remains unchanged. It is usually translated as constant, … Read more

Microcontroller C Language Programming Insights

Microcontroller C Language Programming Insights

During the process of writing this 8*8 key program, whether I was writing it myself or referencing others’ programs, I found that I had many misunderstandings about some basic points of C language and programming norms. Some were due to my previous bad programming habits, and some were a manifestation of not having a solid … Read more