PIC default pin status

Mar 18, 2008 4 Replies

To save time -- thought I'd ask.



I forgot to assign (TRIS) a few pins on a PIC16C65.



They are unused but like I say I didn't assign them as inputs or outputs in software....they're just ignored.



Do they default to outputs? (I thought they did) (some "strange things happening, hopefully this may be it).



If not, of course I'll assign them to outputs.



THANKS


They usually default to inputs. It'll be in the data sheet.

Leon

They should default to inputs. A much more benign thing than defaulting to an output.

As Leon wrote, usually they are setup as inputs at reset time.

What do you mean with they are unused? Sometimes strange things can happen, if the pins are not connected and configured as inputs, because of the high input resistance they are working like an antenna, receiving all kind of noise. Configure them as output, if possible. Some PICs have weak pullups, which can be used, too, instead of outputs, e.g. if they can are connected externaly, but if they can float.

Frank Buss, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de

Thanks.

I don't know why I had it backwards -- inputs is a real problem, but glad to hear it as I'm sure it will cure the problem.

Some erratic behavior.

I'll make them outputs -- the pins are going nowhere -- just to empty pads on the PCB.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required