Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Unused micro I/Os

Status
Not open for further replies.
What do you do with unused I/O pins. I am using a PIC16f630 and I have 3 I/O pins that I am not using. Do I leave them un-connected or grounded and should they be programed as inputs or outputs? Also I would like to use the MCLR for future in-circuit programming. In the config statement should the MCLR be ON of OFF?
 
Set unused I/O pins to outputs. Setting MCLRE_ON makes it behave as a reset pin, in which case you have to tie it to V+ via 10k resistor and pull it to ground to reset.
 
Connect and R, G, and B LED to them and use it in feedback, or status display.

Or, as upand_at_them said, set them to outputs.
 
Maybe you should rethink why is it that on reset all pins are input unless you set them as output.

If you set as output and it's low and you short to VDD end of that pin, say you set it high and short it to gnd end of that pin

Now if it was a input it would see a hi or low but not blow the pin.

And you would set MClR ON if you don't need the pin Off if you want to use it.

So if you set as output you need to take great care to unsure the state of the pin is not shorted.
 
Last edited:
To be honest, this is a VERY, VERY frequently asked question, and appears to come about because of the consequences of leaving inputs open on CMOS logic chips (4000 series) decades ago.

It was discussed (and tested) endlessly many years ago on the PICList, and the general consensus was that it really makes little difference with a PIC - as be80be pointed out, the default is input, and this is a 'safe' way to leave it.

The only pin that is of concern is obviously MCLR, if this is set to be the reset pin it MUST be pulled high, either via a resistor (4.7K seems to be suggested in the PICKit3 connection details) or connected directly to Vdd (which would obviously prevent ICSP - but this is essentially the same with the reset pin on any micro.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top