sets the pin mode