There's a lot of unsaid things here, even a series resistor might work, depending on what you're doing with the pin.