Anti-interference measures in single chip microcomputer system application
Aiming at the interference problem in the application of single-chip microcomputer system, several anti-interference measures are introduced, which effectively improve the operating reliability of single-chip microcomputer system.
Keywords: single-chip microcomputer; anti-interference; program; software; hardware
(1) Power supply system
In microcomputer systems, the most serious source of interference is power supply pollution. In order to prevent interference introduced from the power supply system, the power supply of the microcomputer should be separated from the power supply of high-power electrical equipment, preferably separately; second, a low-pass filter should be connected in series to the primary of the power transformer of the single-chip microcomputer system (as shown in Figure 1) to effectively prevent high-order harmonics from entering the system, improve the power supply waveform, and enhance the anti-interference ability of the single-chip microcomputer system.
(2) Input and
output channels The input and output channels are the paths for information transmission between the single-chip microcomputer and the sensor, the single-chip microcomputer and the host computer, and the single-chip microcomputer and the actuator. In microcomputer systems, the information on the transmission line is mostly pulse waves and weaker measurement signal voltages, which will cause attenuation, delay, and distortion during long-distance transmission. Signal isolation is a necessary and effective measure to resist external interference. It isolates the common mode voltage of the outside world and the electromagnetic interference of the outside world, thereby ensuring the working environment of the single-chip microcomputer and enabling the normal operation of the entire system.
The program running monitoring system, also known as the "watchdog", is an effective circuit to prevent the computer system from freezing. Some single-chip microcomputers (80C552, etc.) include a "watchdog" circuit on the chip; the program running monitoring system can also be implemented with a dedicated hardware circuit. Once the "watchdog" circuit is started, if the reset pulse sent by the CPU is not received within the specified time, the "watchdog" circuit will send a "reset" pulse to the CPU.
2.2 Hardware Flag
In many industrial control systems, the system startup is carried out in a certain order, and the equipment is not allowed to restart in this order midway. Once the single-chip microcomputer system is reset, it must be accurately determined whether it is a power-on reset. Because out-of-control programs often have illegal write operations, the reliability of software flags is low. In situations where reliability is required to be high, a hardware power-on flag is usually set (as shown in Figure 2).
It can be seen that the microcomputer system can accurately determine the cause of the reset, and thus take corresponding handling procedures, effectively improving the reliability of the system.
3.2 Establishing software traps
The so-called "software trap" is a set of program segments added to the program to intercept the bounced program. It forces the program to turn to a specific address, where the error handling program is placed. If the entry label of the error handling program is named "ERR", the software trap usually consists of the following three sentences:
Once the bounced program is intercepted, immediately turn to the error handling program.
3.3 Error handling program
The common point of the error handling program is to turn off the interrupt first to prevent the situation from escalating. For systems with a "watchdog" circuit, just wait for reset. However, software reset is different from hardware "watchdog" reset. At this time, the status of the registers and I/O ports in the CPU chip is uncertain. Therefore, before the error handling program turns to the program starting point, it must reset the registers in the CPU chip, the activated interrupt flags, and the I/O port "software", enter the initial state, and then turn to the program starting point.
3.4 Other measures
In the control system composed of single-chip microcomputers, the output of the adjustment quantity is constantly changing. After the single-chip microcomputer system is disturbed and abnormally reset, the status of the flag unit, output buffer unit, and I/O port in the RAM area may change, and the data cannot be restored as the state after the system is reset. At this time, the manual given quantity can be used as the current controller output quantity. These measures can effectively reduce the disturbance caused to the entire system after the single-chip microcomputer is abnormally reset.
Previous article:New M-Series Products Set Higher Standards for Data Collection
Next article:The current status and existing problems of FCS technology application in China
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- 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
- Data centers, high-performance computing, consumer electronics products - these testing solutions are all here, waiting for you!
- KiCad RF Tools
- MC34063 step-down circuit
- Disassemble a Hall three-axis joystick
- Review of the concepts of intrinsic semiconductors and PN junctions
- Join the stm32 development team, increase friendship and increase income...
- EEWORLD University Hall----Live Replay: TI's Industry's Most Accurate 3D Hall Effect Position Sensor
- The STM8S003 program disappears easily
- (nand) sd boot
- EEWORLD University Hall----Live Replay: Introduction and Application of C2000? Built-in Programmable Logic Module CLB