ports in high Z state

Hi,
can anyone help me as i require to keep some pins in high impedance state how do i do it?
arduino used- Arduino Mega 2560

thanks
PS :I am new to this device

After a reset, all pins are in high impedance state (because they are configured as inputs). No special action involved. To play it safe (some pins are used by the bootloader) you can set the pinMode for the TX pin and for the led pin (13) to INPUT in your setup; this is only needed if you have special requirements for those pins.

thanks :slight_smile: