4 ways to solve the reset trigger of 51 MCU

Publisher:WhisperingWishLatest update time:2020-02-13 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

One annoying feature of the 51 core microcontroller is that during reset, the IO port is in a high level state. If the device controlled by the IO port is triggered by a high level, the device will be triggered at the moment of reset.

Here are some solutions I have encountered:

1. Replace the MCU with another system, such as AVR, PIC, etc. When these microcontrollers are reset, the IO ports are in a floating high-impedance state and will not cause triggering.

2. Use inverting drive, the MCU outputs low level and inverts it to high level to control the device. The high level during reset is inverted to low level and will not trigger. This is a common method, stable, but the wiring is much more complicated.


3. Use optocoupler isolation. After optocoupler isolation, the MCU also outputs a low level to turn on the optocoupler and then drive the controlled device. The high level during reset will not turn on the optocoupler and will not cause false triggering.


4. Use redundant IO ports for locking. This method is rather strange. Pick one of the unused IO ports and connect it to the base of the NPN tube, and then connect the emitter of the NPN tube to the controlled IO port. When resetting, all IO ports are at a high level, and the NPN tube is turned on, forcibly pulling the controlled IO port down, which is equivalent to locking the level of the controlled IO port to a low level to avoid triggering the controlled device. This method must be coordinated with the software. After the reset is completed, the software must set the IO connected to the base of the NPN tube to a low level to release the controlled IO port. This method is rarely used. After all, it requires redundant IO ports, and transistors and resistors must be added. The wiring is much more complicated and the cost is also increased.


5. Use filter capacitors. Connect a uF capacitor and a K-class resistor between the controlled IO port and the ground, which is similar to a buffering effect. At the moment of power-on, the IO port charges the capacitor through the resistor, and the level gradually rises. As long as the parameters of the capacitor and the resistor are properly selected, the MCU will have reset and lowered the level before the IO port has time to trigger the device due to the buffering effect, thus avoiding false triggering. This method has certain limitations and will cause the device to respond more slowly. Therefore, the level of the controlled IO port cannot change too quickly, otherwise the device cannot be effectively controlled due to the buffering effect of the capacitor.

Reference address:4 ways to solve the reset trigger of 51 MCU

Previous article:51 single chip microcomputer controls two stepper motors
Next article:Single chip school bell system

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号