8051 Port Reading

hey, hi to all

In 8051 based microcontroller

Is it necessary to write 0xFF if i want to use P1,P2,P3 port as input port?

If yes then can i change the port I/O configuration in program anytime?

More questions in this forum