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.