There is no definitive answer, though the general consensus is to make them inputs and tie them high or low through a resister. While they are high impedance already, tying them directly to the power supply is generally a bad idea, mainly because the chance of blowing up the chip with the wrong supply increases, but also to reduce the already miniscule current consumption. -Adam Paul Reilly wrote: > > Hi, > > I'm using a PICF877 in a project. It's got more ports than you could > shake a stick at. My question is do I need to worry about ports I'm not > using? Presently my code initialses all the ports at the beginning, > regardless of they're going to be used. It then sets unused ports as > inputs, like so: > > bcf STATUS, RP0 ; \ > bcf STATUS, RP1 ; / select bank 0 > clrf PORTA ; initialise PORTA > clrf PORTB ; initialise PORTB > clrf PORTC ; initialise PORTC > clrf PORTD ; initialise PORTD > clrf PORTE ; initialise PORTE > > movlw B'11111111' ; port C - not used > movwf TRISC ; make all inputs > > etc > > Is this worth doing, or can I just ignore unused ports and not bother > setting their TRIS bits? I was going to tie all unused to Vss. > > Paul > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.