Dealing with unused pins of microcontrollers

Publisher:bullfishLatest update time:2016-03-10 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

1.jpg

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.

2.jpg

(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).

3.jpg

The risks are:

4.jpg

Finally, I think it is safer to connect each resistor to ground.

Keywords:MCU Reference address:Dealing with unused pins of microcontrollers

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

MCU Program Optimization
The microcontroller is not a PC. We need to examine the speed and efficiency of the operation. If we want our program to run "fast", optimization is the key.   Data type selection: select the appropriate data type.   Floating-point operation: The CPU processes floating-point operations very slowly, so floating-poin
[Microcontroller]
Design of small resistance tester based on C8051F005 single chip microcomputer
In the process of circuit testing, it is often encountered that there is a large error between the experimental data and the theoretical value due to the neglect of the influence of some small resistances, thus affecting the test effect. For example, copper resistance often exists in inductors and transformers
[Microcontroller]
Design of small resistance tester based on C8051F005 single chip microcomputer
Design of Encryption Fuse for MSP430 Series Microcontroller
introduction The MSP430 series microcontroller is a 16-bit ultra-low power microcontroller launched by Texas Instruments (TI). It can operate at a voltage of 1.8 to 3.6 V and a frequency of 1 MHz, with a current consumption of 0.1 to 400 μA. In terms of computing speed, the MSP430 series microcontroller can ach
[Microcontroller]
Design of Encryption Fuse for MSP430 Series Microcontroller
MathWorks Simulink Products Now Support Infineon’s Newest AURIX™ TC4x Family of Automotive Microcontrollers
MathWorks Simulink Products Now Support Infineon’s Newest AURIX™ TC4x Family of Automotive Microcontrollers Beijing, China, December 13, 2022 - MathWorks and Infineon Technologies AG today announced the launch of a hardware support package for MathWorks Simulink® products, providing su
[Automotive Electronics]
MathWorks Simulink Products Now Support Infineon’s Newest AURIX™ TC4x Family of Automotive Microcontrollers
Using the I/0 port of the microcontroller to do a key input experiment
The I/0 port of a typical microcontroller is a quasi-bidirectional port, which can be used as both an output port and an input port. In specific operations, we write data out of the I/0 port to use it as an output port; if we directly call the current state of the I/0 port in the program, assign values ​​to our defi
[Analog Electronics]
Using the I/0 port of the microcontroller to do a key input experiment
MCU interrupt problem
Introduction: Isn't the interrupt of 51 MCU just jumping to another place when something happens in the middle, and returning after execution? Why do we need to use interrupts specifically? Can't we just jump to the instruction directly? First of all, to understand the interrupt, we must first talk about the pins of
[Microcontroller]
C51 global initialization and precise delay program, 51 microcontroller precise delay program
/****************************************************** *************************************************** ****** * Initialization Program * QiZhao,2007 * All Rights Reserved * File : initial.h * By : QiZhao * Contact :zq1987731@163.com * * Version : V2.1 γ * Corrector : QiZhao * Date : 2008.2.1 (Last modified) * * R
[Microcontroller]
What special function registers does the microcontroller have?
There are 21 special function registers in the 8051 microcontroller, which are physically scattered in the functional components of the chip, and mathematically organized in the internal data memory address space 80H~FFH so that they can be accessed using a unified direct addressing method. These special function regi
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号