Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what is the best practice to leave unused pins in a micro-controller

Not open for further replies.


Full Member level 3
Apr 10, 2012
Reaction score
Trophy points
Activity points

I am using the 8F4620 mcu, in my project some of the pins in the device are left un used, some pins on the PortB, some on the PortA.

What is the best practice to leave these pins without causing damage to the mcu. Normally I leave them un connected (just open), is it necessary to connect these to pullup resistances or LEDs (through resistances) ??


but what if I leave them not connected to anything, will this damage the mcu ??

No, it will not damage the MCU but make then as digital input pins.

but what if I leave them not connected to anything, will this damage the mcu ??

open pins can easily pickup noise.
sometimes difficult to debug.
so connect either to 1 or 0 level.

You can't leave **broken link removed**.That can damage the IC itself... IF they are inputs Pull Up/Down

so if I configure the unused pins as digital inputs, then do I have to connect pullup resistances to them ?? or should I just configure as input and leave it.

Alternatively Is it OK to configure as output and keep them low through firmware

You can leave them in any configuration. It always protected by internal diodes. But good practice to leave them as digital input. Also, pull-up if available. But not mandatory.
If I have the space, I'll run them to a non-populated connector and set them as outputs set to low.

Could this damage the chip ??

Not properly damage, but could increase power consumption in the presence of a noisy environment if these inputs are type of CMOS, but as far as I know most microcontrollers have general inputs of type ST.

The input buffer of digital inputs will sink additional power if inputs float to an intermediate level. So in a low power design, you'll never leave digital inputs floating. Configuring the unconnected pins as analog input (if available for the respective pins) would avoid this issue.

Alternatively Is it OK to configure as output and keep them low through firmware
That's my preferred option for unconnected pins that have no pull-up or pull-down resistors.

If you want to left it as open Better to configure as an output compared to configuring as an input. Unless until you are not going to connect anything on that pin you don't even have to worry about drive strength or source current of it.

thanks everyone for the tips...

I was curious as one of the pins (Txd) in a 18F4620-SPDIP mcu got damaged after working for some time. The Txd pin was connected to a SN75LBC184 RS485 transceiver. The RS485 line was long at least 10m, and the system was installed in an industrial environment (lots of heavy duty motors around), moreover there was a stepper motor near the mcu.

Do you think the unused pins could have damaged the Txd pin of the mcu ?? Curiously only the Txd pin was damaged, while other pins where all working...

Just for your information, the mcu alongwith the PCB was sealed in an aluminium box using Araldite...(the entire mcu with PCB was immersed in araldite).

Could this also be responsible for the damage ?? I know some passive components are sealed in this way, but is this method advisable for micro-controllers ???

The current consumption of the mcu was less than 30mA, so I don't think heat could have damaged the pin...

Interestingly a similar unit (having another 18F4620 mcu, and sealed in similar manner) was connected to the defective unit via RS 485 cable, and also shared same power supply unit did not get damaged, and continues to work without any problem...

Just wanted to know your opinion...

Last edited:

Is araldite is touching any of the components in the PCB?

yes almost all the components, the components are immersed in Araldite..

Not open for further replies.

Part and Inventory Search

Welcome to