# Error in making pins input in PIC32

I am trying to make some pins act as input in PIC32MX795F512L.

I am doing like this

TRISEbits.TRISE9 = 1
TRISBbits.TRISB5 = 1
TRISCbits.TRISC13 = 1


So I making above pins as input. But when I debug my code, all the pins of PORTE are acting as input whereas I have only made PINE9 input. Same is happening with other PORTS.

What could be the reason for this.?

Also I want to know that what is the default status of PIN(input or ouput), when we don't make it input or output.? I am really confused at this point. Please help.?

• I don't know about PIC32 but for 8-bit PICs the default port state is is always input. The datasheet should tell you. – Roger Rowland Nov 18 '15 at 7:53