How to improve the anti-jamming of single chip microcomputer

Source: Internet
Author: User

How to improve the anti-jamming of single-chip microcomputer to make you less detours have made the product of friends have experience, a design seemingly simple, hardware design and code writing quickly done, but in the debugging process but more or less accidents, these are anti-jamming ability is not enough embodiment. Let's discuss how to make your design avoid detours: anti-interference embodied in 2 aspects, one is hardware design, the other is software writing. Here is the key to remind: in MCU design, the main anti-jamming design is hardware, software supplemented. Because the MCU has limited computing power, it takes a lot of effort on the hardware. Look at the way of interference: 1: Interference signal interference MCU's main path is through the I/O port, one is affecting the MCU data acquisition, and the other internal registers are affected. Workaround: Discussed later. 2: Power interference: Although the MCU adapts to a wide voltage (3-5). 5V), but is sensitive to fluctuations in the power supply, such as the MCU can be stable at 3V voltage, but not in the voltage 3v-5. Stable operation in the case of 5V fluctuations. Solution: With the power supply voltage regulator block, do a good job of filtering the power supply, Tip: Be sure to bypass the power supply and 0. 1UF of ceramic capacitors to filter out high-frequency interferences, as electrolytic capacitors do not work for high-frequency interference exceeding dozens of khz. 3: Up and down electrical interference: but each MCU system in power time to go through such a process, so pay special attention. Although the MCU can work stably at 3V voltage, it does not mean that it cannot operate at voltages below 3V, but the MCU is ultra-unstable at such a low voltage. In the system power-up, the system supply voltage from 0V to the rated voltage, such as when the voltage to 2V, the MCU began to work, but at this time is ultra-unstable work, very easy to run fly. WORKAROUND: 1 allow the MCU to start working after the power supply has stabilized. Pic Integrates a por (internal power-on-delay reset) on-chip, which must be turned on in the configuration bit. External power-on delay reset circuit. There are many forms, the low cost is to reset the foot to connect a resistor capacitance circuit. The high cost is the use of dedicated chips. This is a lot of information and can be found everywhere. The most difficult to exclude is the first interference above, and the interference signal can occur at any time, the intensity of the interference signal is not the same. But they also have the same point: the interference signal also follows Ohm's law, interference signal coupling path is nothing but electromagnetic interference, one is the spark, the second is the magnetic field. The most disturbing is the electric spark interference, followed by the magnetic field interference. Electric spark interference performance occasions are mainly near the high-power switch, relays, contactors, brush motor and so on. Magnetic field interference performance is mainly near a high-power AC motor, transformers and so on. Solution: 1th: is also the most classic, is in the PCB step line and component location arrangement, this middle learning a lot, say a few days are not finished ^ ^. Second: Considering the input impedance of each I/O port, acquisition rate and other factors to design the peripheral circuit of I/O port. Generally determines the input resistance of an I/O portThere are 3 cases of resistance: the A:I/O port has a pull-up resistor, and the pull-up resistor value is the input impedance of the I/O port. Generally we use the 4k-20k resistor to do pull-up, (pic of the B-port internal pull-up resistor about 20K). Because the interference signal also follows Ohm's law, in the case of interference, the choice of pull-up resistor will be smaller, because the interference signal on the resistance of the resulting voltage is less. As the pull-up resistor the smaller the more power consumption, so in the home design, the pull-up resistor is generally 10-20k, and in the case of strong interference can even low pull resistance to 1K. (If you want to discard the B-port pull-up function in a strong interference situation, be sure to use an external pull-up.) ) The B:I/O port is connected to the output pin of other digital circuit, at this time I/O port input impedance is the impedance of digital circuit outlet, generally dozens of to hundreds of kohm. It can be seen that the use of digital circuit intermediary can reduce the impedance to the ideal, on many industrial control boards can see a large number of digital circuit is to ensure performance and protection of the MCU. Small capacitance in parallel to the C:I/O port. Because the capacitance is the AC resistance DC, and the interference signal is instantaneous, instantaneous extinguished, so the capacitor can filter the interference signal. But the bad thing is to cause the I/O port to collect the signal rate drops, such as on the serial port and capacitance is not advisable, because the capacitance will be the digital signal when the interference signal filter out.

For some detection switches, reed tubes, hall elements and the like can be capacitance, because these switching volume changes are not possible at a high rate, and a small capacitance to the signal collection is not any impact

(turn) How to improve the anti-interference of single-chip microcomputer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.