Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 1st October 2007, 07:00 PM   (permalink)
Default I/O Ports

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
__________________
World.......behold........YAN is coming
YAN-1 is offline  
Old 1st October 2007, 07:25 PM   (permalink)
Default

I would configure them as outputs in your firmware...
Mike, K8LH is offline  
Old 1st October 2007, 11:35 PM   (permalink)
Default

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!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 2nd October 2007, 12:36 AM   (permalink)
Default

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.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 2nd October 2007, 09:15 AM   (permalink)
Default

Quote:
Originally Posted by Sceadwian
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Help with a project helz15 General Electronics Chat 39 15th October 2007 03:33 PM
lack of signal on PIC Ports Hesam Kamalan Micro Controllers 4 7th July 2006 02:00 PM
About programming Serial/parallel ports TronicBrain Robotics Chat 9 8th June 2005 11:59 PM
Game port to Midi ports? grrr_arrghh General Electronics Chat 0 31st March 2004 09:03 PM
ports xjackal Micro Controllers 2 25th August 2003 03:49 PM



All times are GMT. The time now is 09:56 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker