Controlling LED brightness without using PWM directly

Thank you so much.