I’m currently making a board that needs to drive an external 20 mA red LED using a 1.8V GPIO pin. The LED is mounted on an separate board with a resistor as seen in the diagram. My board is supplied with 3.3V from this separate board.
simulate this circuit – Schematic created using CircuitLab
Can this be done with 1 or 2 transistors? I know that I need to step up the GPIO voltage seeing as the LED has a forward voltage of around 1.8-2V, but I am unsure of how to go about it. Most examples I have been able to find have a transistor on the cathode side of the LED as opposed to this setup, e.g. this post How to blink LED with 1.8V?