4 big MCU development skills, help worry-free development

In the application development of single chip microcomputer, the problem of the use efficiency of the code, the anti-interference and reliability of the single chip are still plagued. Here are a few basic techniques that should be mastered in the development of microcontrollers.

1. How to reduce bugs in the program. For how to reduce the bug of the program, you should first consider the out-of-range management parameters that should be considered in the system operation as follows. Physical parameters: These parameters are mainly the input parameters of the system, which include the excitation parameters, the operating parameters in the acquisition process, and the result parameters of the processing ends. Resource parameters: These parameters are mainly the resources of circuits, devices, and functional units in the system, such as memory capacity, storage unit length, and stacking depth. Application parameters: These application parameters are often expressed in the application conditions of some microcontrollers and functional units. Process parameters: Refers to the parameters of the orderly change in system operation.

2. How to improve the efficiency of C language programming code. The use of C language for microcontroller programming is an inevitable trend in the development and application of single-chip microcomputers. If you are using C programming, to achieve the highest efficiency, it is best to be familiar with the C compiler used. First test the number of statement lines in the corresponding assembly language after each C language compilation, so that you can know the efficiency very clearly. In the future programming, use the most efficient compilation of statements. Each C compiler will have some differences, so the compilation efficiency will be different. The excellent embedded system C compiler code length and execution time is only 5-20% longer than the same function written in assembly language. For complex and time-critical projects, you can use the C language, but only if you are familiar with the C language and C compiler of the MCU system, paying particular attention to the data types and algorithms that the C compiler system can support. Although the C language is the most common high-level language, the C language compilation system is different for different MCU vendors, especially in the operation of some special function modules. So if you don't understand these features, there will be a lot of debugging problems, which will result in lower execution efficiency than assembly language.

3. How to solve the anti-interference problem of the single chip microcomputer. The most effective way to prevent interference is to remove the interference source and block the interference path, but it is often difficult to do so, so it can only be seen that the anti-interference ability of the single-chip microcomputer is not strong enough. While improving the anti-interference ability of the hardware system, the software anti-interference is more and more valued because of its flexible design, saving hardware resources and good reliability. The most common phenomenon of single-chip interference is reset. As for the program running away, software traps and watchdogs can also be used to pull the program back to the reset state; therefore, the most important thing for the MCU software to resist interference is to handle the reset state. Generally, the MCU will have some flag registers, which can be used to determine the cause of the reset. In addition, you can also embed some flags in the RAM yourself. At each program reset, by judging these flags, it is possible to determine different reset causes; it is also possible to jump directly to the corresponding program according to different flags. This will make the program run continuously, and the user will not notice that the program has been reset after use.

4. How to test the reliability of the single-chip system. When a single-chip system design is completed, there will be different test items and methods for different single-chip system products, but some must be tested: the integrity of the test single-chip software function; power-on, power-down test; aging test; ESD and EFT and other tests. Sometimes, we can also simulate the damage that can occur during human use. For example, the human or clothing fabric is intentionally rubbed against the contact port of the microcontroller system, thereby testing the antistatic capability. The high-power electric drill is used to work close to the single-chip system, thereby testing the anti-electromagnetic interference capability.

In summary, MCU has become an important aspect of computer development and application. The important significance of MCU application is that it fundamentally changes the traditional control system design ideas and design methods. Most of the functions that must have been implemented by analog or digital circuits have now been implemented using software methods using microcontrollers. This software instead of hardware control technology, also known as micro-control technology, is a revolution in traditional control technology. In addition, we must master the skills and improve efficiency in the development and application process, in order to play its wider use.

Miniature Circuit Breaker

Mini Circuit breakers, also named as the air switch which have a short for arc extinguishing device. It is a switch role, and also is a automatic protection of low-voltage electrical distribution. Its role is equivalent to the combination of switch. Fuse. Thermal Relay and other electrical components. It mainly used for short circuit and overload protection. Generally, According to the poles, mini Circuit breaker can be divided into 1P , 1P+N , 2P, 3P and 4P.


Miniature Circuit Breaker,Electronics Miniature Circuits Breaker,Automatic Miniature Circuit Breaker,Mini Circuit Breaker,MCB

Wenzhou Korlen Electric Appliances Co., Ltd. , https://www.zjmannualmotorstarter.com

Posted on