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.
Previous article:51 single chip microcomputer controls two stepper motors
Next article:Single chip school bell system
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Tomorrow is the winter solstice. Do you eat dumplings or glutinous rice balls?
- 【Home smart dashboard】MQTT communication, PC host computer design
- My 2000th post
- Showing goods + NVIDIA AI small board
- Circuit diagram of two-wheeled electric vehicle
- [Domestic RISC-V Linux Board Fang·Starlight VisionFive Trial Report] Python output HELLOWORLD
- Solutions for control loop design
- Data size transferred after power failure
- About DMX dimming system
- What is UWB?