I/O Ports

Status
Not open for further replies.

YAN-1

New Member
Hello. I have a PCB that has several PIC microcontrollers (16F877A) on it, each doing a certain function. The PCB comprises a ground plane. I was wondering what to do with the I/O pins that are unused in the PICs. Is it better to configure them as inputs or as outputs? When drawing the PCB, I didn't consider this issue and I left those pins floating, and now I have the board almost completed. I can connect those pins to the ground but that would be tedious since I have to scratch the pads to connect them to the ground plane. What is the best thing to do? Thanks for your help.

Nichola V Abdo
 
To be honest it makes sod all difference - the fallacy about what you do with unused pins comes from old CMOS gates, where leaving the inputs open can greatly increase the current the chip draws. PIC's have no such problems, if the pin is set as an input, and you don't use it, you shouldn't be reading it anyway!.
 
Reading it or not Nigel if the pin is floating the input impedance is pretty high, accidental capacitive coupling to a nearby component can occur which can cause the input pin to oscilate, even if it's not being read the internal comparators are triggering and it draws power, especially if the signal is of high frequency. If you have a ground plain even without physically connecting the pins setting them to outputs and low would be a good idea. I've had pins left floating follow a nearby pin's output voltage on breadboards before.
 

This was discussed at great length years ago on the PICList, the outcome was that no one had ever been able to see (or measure) any difference with either setting the pins as outputs, or as inputs with the pin strapped high or low, or as inputs left floating.

If you're using a breadboard you've obviously got the problem of the high capacitance between tracks, so you're essentially fitting a capacitor between the free pin and the pins next to it.

Pbvious answer, if you're at all concerned, is to simply set the pin as an output - although it almost certainly won't make a bit of difference.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…