PDA

View Full Version : Newbie question



senojlr
- 5th April 2006, 02:42
I know this is probably a dumb question but should all of the unused pins on a pic chip be tied to dc supply - to prevent interferance ?

Melanie
- 5th April 2006, 09:41
No, you don't have to. You can always switch them in software to OUTPUT (with TRIS statement) which will do the same thing - prevent them from floating and acquiring a static charge which could damage the PIC, or tripping Port/Pin change interrupts etc. This is more useful, because if future modifications are going to be performed, you don't need to start cutting tracks if you need an extra pin for something. A big mistake people do is they design a board using an Input Only pin for an output circuit and then go make PCB's with this error. It's easier to correct a mistake like this if you haven't nailed all your spare pins to a Supply rail.

Some PICs have Input Only pins (as mentioned above). If they are going to be unused, then you can tie those to either Vcc or Vss.

mister_e
- 5th April 2006, 23:24
Sorry... i'd already did it... but i'll no longer do that.

Maybe it's good enough IF and ONLY IF the unit it always running AND/OR your pcb is located in a shielded metal enclosure. Got too much bad experiment by leaving pin floating in the air AND assign them to output. Even with the best PCB design and ground plane, it gave me odd results in car application where noise is a major problem. Metal enclosure will probably be better... in fact it should.

What you can do if you plan to use the extra I/O one day or another, is to use those 0 OHMS resistors as jumper. You need an i/o, you remove a 0 Ohm resistor... not much. Sure you can use other value if it's a battery powered system or if yu want to reduce the total curent consumption... a little bit depending the PIC you use and all the pah plah plah that comes with.

Same thing with internal pull-ups... i never use them on a final product, can't trust them enough for that. They're good enough for me for experimenting when i'm too lazy to place few resistor.

just another point of view.

WARNING: I don't want to start any wave and flame of any sort!

senojlr
- 9th April 2006, 22:09
Melanie and Steve, thanks for the advise. I don't think that I will ever need the pins in the future on this application and it is more important to me to be sure that I don't have noise problems so I am going to go ahead and tie the unused inputs to the supply rail.

keithdoxey
- 10th April 2006, 00:04
I don't think that I will ever need the pins in the future on this application

Hands up all those who have said similar in the past :D

mister_e
- 11th April 2006, 05:09
Hehe, well there's still a slight difference between Thinking and Saying.

I'm not going to use those pins in future

OR

I don't think i'll use them

Maybe this is why i use 0 ohms resistor even if i hate to do some PCB upgrade or modification.. ARGH! waste of time for me... but sometimes when there's a few hundred, thousand, million PCBs on the market and your customer(s), as much (see all) of them, need a cheap solution, you have no more choice. Do and sold a ModKit is still another idea when you can trust the one who'll do the modif for you.

BTW, now i mostely sold the whole design (PCB drawings, Schematic, HEX files) and the customer have to do everything on it's own when the prototype i send to them is aproved. Problem less for me.

Archilochus
- 11th April 2006, 18:56
I was just thinking... I'd get sort of nervous connecting a pin that could possibly become an output directly to one of the power supply rails. If I felt that I needed to connect the pin to something, I'd most likely do what Steve suggested, but in place of a 0 Ohm resistor maybe a ~470 Ohm or so?

Or is that silly?

Arch

mister_e
- 11th April 2006, 21:23
you're always suppose to know exactly what pin do what. You're the only one who can modify a pin to output (in theory) Sure you can use any kind of resistor bellow 10K. If your design use some Network Resistor and you have some spare in, why not using them?

Few extra i/o are still usefull anyways, just think what else you can do with. Calibration/Maintenance button, status output for XYZ stuff, list is long enough.

Out of curiosity, how many spare i/o do you have?