Some Issues Regarding Stacks in Microcontroller Programming

Some Issues Regarding Stacks in Microcontroller Programming

Wu Jianying Microcontroller Development Board Address Store:【Wu Jianying’s Shop】 Address:【https://item.taobao.com/item.htm?_u=ukgdp5a7629&id=524088004171】 The compiler uses two stacks: one is the hardware stack for subroutine calls and interrupt operations, and the other is the software stack for temporary variables and local variables passed in a stack structure. The hardware stack is allocated starting from the top of the … Read more

Microcontroller Programming Examples Collection (1-30)

Microcontroller Programming Examples Collection (1-30)

*Example 1: Use P3 port to light up 8 LEDs in sequence #include<reg51.h> // Include the header file for microcontroller registers / Function: Delay for a period of time void delay(void) { unsigned char i,j; for(i=0;i<250;i++) for(j=0;j<250;j++) ; } / Function: Main function void main(void) { while(1) { P3=0xfe; // First LED on delay(); // … Read more

9 Major Challenges in Microcontroller Programming

9 Major Challenges in Microcontroller Programming

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

Basic Knowledge Q&A on Microcontroller Programming

Basic Knowledge Q&A on Microcontroller Programming

Wu Jianying Microcontroller Development Board Address Store:【Wu Jianying’s Shop】 Address:【https://item.taobao.com/item.htm?_u=ukgdp5a7629&id=524088004171】 1. How Long Can 8-bit Machines Last! Answer: Currently, the main MCU products are still in the 8-bit field, mainly applied in six major markets: automotive applications, consumer electronics, computers and PC peripherals, telecommunications, office automation, and industrial control. Among these, the automotive market is … Read more

Top 10 Challenges in Microcontroller Programming

Top 10 Challenges in Microcontroller Programming

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 characters to represent machine instructions, making it the closest language to machine code. Its main advantages are low resource usage and high program execution efficiency. However, the assembly language … Read more

Summary of Microcontroller Programming Issues

Summary of Microcontroller Programming Issues

Wu Jianying Microcontroller Development Board Address Shop: 【Wu Jianying’s Shop】 Address: 【https://item.taobao.com/item.htm?_u=ukgdp5a7629&id=524088004171】 1. The pointer to the code area array must also declare the code keyword. For example, for the array unsigned char code arr[30];, to point to it, the pointer must also be declared as unsigned char code *p; Later use found that in … Read more

10 Questions and Answers on Microcontroller Programming

10 Questions and Answers on Microcontroller Programming

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 symbols to represent machine instructions, making it the closest language to machine code. Its main advantages are low resource usage and high program execution efficiency. However, the assembly language … Read more

Microcontroller Programming Experience Summary

Microcontroller Programming Experience Summary

Using “Software Traps + Program Command” to Deal with PC Pointer Jumps When the CPU is interfered with from the outside, sometimes the PC pointer can jump to another segment of the program or to a blank segment. In fact, if the PC pointer jumps to a blank segment, it can be handled easily. Just … Read more

Microcontroller Programming: The Soul-Searching Question of Feeding Dogs…

Microcontroller Programming: The Soul-Searching Question of Feeding Dogs...

[Introduction] Writing so many microcontroller programs, you see the watchdog every day, are you raising your dog correctly? Just keep feeding the dog as long as it doesn’t bark, right? Is it really that simple? In fact, it may not be as simple as you think….. What Is a Watchdog? A watchdog, also known as … Read more