What is the best way to make a level translator for a led matrix? I have an mcu port 3,3V 5mA and I want to replace the leds with higher voltage and current, 24V 50mA for example
This is my led array

simulate this circuit – Schematic created using CircuitLab
and this is a push-pull level translator I made. There is a problem in my level translator that allows a current flow through output stage when the input is 0V. I assume this happens because the PNP does not turn off completely. The amount of current is about 20mA at 24V.

I would like to be able to choose what kind of LED I use in my matrix. I want circuit to be flexible to choose whatever voltage and current, of course between some limits.
Improved circuit:

Alternative suggestion:

I decided to go with first Transistor's suggestion.
First, let me show you how the software control the led matrix.

When a row is pulled high, the corresponding column is pulled low and the other column are pulled high. In current level of voltages the leds can withstand the reverse bias of -3.3V. But, the push-pull circuit will reverse bias some leds with much higher voltages and this will damage the leds. (If the leds are bidirectional will not be damaged but they will be lit instead).
The solution, according to @Transistor is: A non-inverting high side switch that pulls the row high when the corresponding PIN is high. And a non-inverting low side switch that pulls the column low when the corresponding PIN asserted low


