Usually we don't use up all the pins of the microcontroller, and sometimes we also have high and low configurations on the same product, so how to treat some unused pins becomes a problem. First, let's take a look at the structure of the microcontroller pins.
We can find that the IO ports of general microcontrollers can be configured.
CMOS device pins are composed of N-channel and P-channel field effect transistors. Usually, only one tube is turned on at a time, but there is a very short transition period when both tubes are partially turned on, when one tube is turned off and the other is turned on. An unterminated input port may oscillate or float at an intermediate level, causing all field effect tube devices to be in a slightly turned-on state, resulting in tube losses, increased noise, and consumption of additional power supply current.
(Input Only) Input-only pin
1. Use pull-up or pull-down resistors to pull each unused pin to VSS or VDD. This is the recommended method.
2. Bundle together and use a single resistor to pull up/down to VDD or ground, saving component count and cost, but this reduces flexibility.
(Input/Output) Input/Output Pin
1. Pull down each pin with a resistor to ground (VSS).
2. Pull several pins down to ground (VSS) with the same resistor.
3. For unconnected pins, the software program configures the IO ports as output ports and sets them to output low.
4. Connect a resistor to Vss and configure the IO port to output low.
5. Connect directly to ground, the software program configures the port as a high-impedance input port and sets the register to output low state.
Note that this will cause problems due to double faults (a pin changing from input to output and an output changing from a low to high state).
The risks are:
Finally, I think it is safer to connect each resistor to ground.
Previous article:8 ways to solve MCU EMC problems
Next article:The most popular introduction to MCU watchdog
Recommended ReadingLatest update time:2024-11-16 14:36
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Ubuntu 18.04 version compiles Android and reports an error
- EEWORLD University Hall ---- Introduction to UAV Design - Nanjing University of Aeronautics and Astronautics
- EEWORLD University Hall--Detailed explanation of algorithms Stanford University classic video course
- [Master's Year-end Lecture] Control the last mile: How to prevent performance problems before a major network outage occurs
- A silicon microphone was soldered with flying wires
- EEWORLD University Hall----Embedded System Theory and Technology Wuhan University of Science and Technology
- Share a plug-in mpfshell that can run MicroPyhton code on VSCODE.
- EEWORLD University - Learn about industrial ARM using Sitara AM6x training series
- Interpolation filter design
- [ATmega4809 Curiosity Nano Review] Development Environment Setup