Skip to main content
deleted 4 characters in body
Source Link
Mark
  • 11.7k
  • 1
  • 33
  • 38

Assuming your PWM output can supply enough current for both LED's then put a FET between the cathode and ground for each LED. Control the each FET's gate with an I/O line from the microcontroller. This way you can turn either on, both off, or both on by controlling the I/O lines.

Just make sure the PWM pins on the uC can actually provide enough current to drive the LED and that the current is properly limited.

Assuming your PWM output can supply enough current for both LED's then put a FET between the cathode and ground for each LED. Control the each FET's gate with an I/O line from the microcontroller. This way you can turn either on, both off, or both on by controlling the I/O lines.

Just make sure the PWM pins on the uC can actually provide enough current to drive the LED and that the current is properly limited.

Assuming your PWM output can supply enough current for both LED's then put a FET between the cathode and ground for each LED. Control each FET's gate with an I/O line from the microcontroller. This way you can turn either on, both off, or both on by controlling the I/O lines.

Just make sure the PWM pins on the uC can actually provide enough current to drive the LED and that the current is properly limited.

Source Link
Mark
  • 11.7k
  • 1
  • 33
  • 38

Assuming your PWM output can supply enough current for both LED's then put a FET between the cathode and ground for each LED. Control the each FET's gate with an I/O line from the microcontroller. This way you can turn either on, both off, or both on by controlling the I/O lines.

Just make sure the PWM pins on the uC can actually provide enough current to drive the LED and that the current is properly limited.