Quote Originally Posted by ShawnB View Post
So I should look at adding PORTx = 0 before the TRISx register to clear the port register?

Is this good programming practice (newbe question)?

I have pull-down resistors on the input but not on the outputs, so I can look at adding those.
By all means clear the ports before changing TRISx. The MC data sheet on this part defines the port pins as UNDEFINED after power-up.

It is definitely good programming practice, even on parts where the data sheet says the pins should be in the state you think you want.

Output pull downs are probably the way to go, just make sure you have enough current to drive them, and they take enough current to actually pull down the input they drive.