When reading this article, I assume that you have learned at least one type of microcontroller, and at least the basic theories, such as the principles of basic units such as interrupts and timers, which you should master. The article will not explain them in detail. At the same time, if this is your first time to use EMC microcontrollers, you must spend at least a week to get familiar with the basic hardware architecture and basic assembly instruction set of EMC microcontrollers.
A few principles:
If you use the old version of the assembly compiler Elan Wice, you must use external software to write and modify the code (Ultra Edit is recommended), because the editor that comes with Elan Wice is defective. When writing a program, it will inexplicably delete an extra line of the program, or inexplicable symbols will appear, and it does not support Chinese characters well. These are extremely prone to logical errors, and it may take a long time to check if you are depressed. You should try to avoid them. The new version of Wice Plus (supports C language) solves these problems, and it is not mandatory to use an external code editor.
If you use the simulator with AC power (AC 220V) for simulation, you must add an isolation transformer to the target board, otherwise the simulator will burn out. Because the simulator uses a parallel port line, the "ground" of the parallel port is connected to the "ground" of the switching power supply. If the target board is connected to the mains, a loop will be formed with the simulator, and the large current will burn the simulator, so be careful when using it. As for the principle of isolation, you can refer to the knowledge of analog electronics and coupling transformers, which will not be explained here. The specific isolation method is shown in the figure below:
Third, don't take it for granted. The E78PXX series has developed to a large number of MCUs. Each MCU is different, especially when it comes to programming. So don't take it for granted that the EM78P156 program can be directly put on the EM78P447. In fact, you are wrong. Whether it is the entry address, interrupt address, interrupt pre-processing, register settings, they are all different. Doing it carelessly will only make you suffer a big loss. So you must read the chip information carefully before using each MCU. If you often need to use several different chips, you can do several "program frameworks" like me and use them directly. These will be discussed in the following chapters.
Fourth, don't doubt the MCU too much. If you hear that EMC is not good on the Internet, then when something goes wrong, you blame the MCU, but never reflect on your own program problems. I have seen many people call us for technical support. In the end, the problems were basically not caused by the MCU or the emulator, but by poor program processing, and some were simply written incorrectly. Therefore, it is good to have more self-examination when writing programs.
Learn to find errors independently. After 2 years, if you ask me what I have learned, I can say without hesitation that I have learned to find problems quickly! ! I remember that when I started working on EMC microcontrollers, I was very depressed when I encountered problems, and it basically took several days to find the problem. But now it is different. Basically, it takes less than 1 minute to locate the problem. I think this is what is called work experience. Of course, this experience is hard-won. When browsing the forum, I found that many beginners like to ask questions as soon as there is a problem, and then post a lot of programs. What I want to say is that since you wrote the program yourself, you should find the error yourself. The worst case scenario is to change the code and rewrite it. Whenever you encounter a problem, ask immediately. Of course, this problem will generally be solved, but what you have learned is "this problem" rather than "this type of problem." The next time you encounter a slight change, I guess you will still be dumbfounded. Therefore, the root of the problem is to learn to find problems by yourself, exercise the ability to think independently, and solve problems independently, which is very beneficial. Of course, if you say that writing programs is just for a meal and you are not obsessed with technology, then you can ignore what I said. This is not preaching, but just a little experience I have personally experienced.
Mountain roads are always the most difficult to walk on, but the scenery on the top of the mountain is always the most beautiful. However, only a few people can see this beautiful scenery. Of course, I hope you are one of them. All technical staff, let's encourage each other.
Previous article:MCU Multiplication and Division Examples
Next article:Single chip microcomputer time sharing concept
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 09 ADC acquisition and power management system (series post)
- 【Short-term weather forecast system】Scheme planning
- 【GD32450I-EVAL】Preliminary Study on TLI-RGB Screen Driver
- An easy-to-understand tutorial on the msp430 microcontroller
- [TI recommended course] #PFC power supply design and inductor design calculation#
- [Distributed temperature and humidity acquisition system] + STM32H745I-LWIP program
- Summary: TI LAUNCHXL-CC2650 evaluation report
- [LAUNCHXL-CC2650] Run the SDK built-in routine
- [Liquid Level Sensor Evaluation] LED Liquid Level Indicator
- Power module source knowledge you will understand after reading it - leakage inductance