Make your unused ports outputs and don't tie them to anything. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: Paul Reilly To: Sent: Friday, September 01, 2000 9:39 AM Subject: 16F877 port setup > 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.