I had written program to blink 8 led's one by one in 8051.it is working fine.
Is possible to indicate if any one of the led goes bad?
I know through multi meter we can check led is good or bad.Is it possible through any other method
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
I suppose you have connected the LEDs to the outputs of the microcontroller with the common ground.
However if you connect the LEDs with the common voltage supply with cathodes connected to the microcontroller you will be able to detect if the current is flowing through the diode.
When you have the LEDs connected like this you have 2 options for the pin configuration:
But you should configure the pin as the input only for LED testing and not to drive the LED. Inputs have high impedance so the current flowing would be low and LED may not turn on.
So if your LED is blinking then you can turn it off and during the off period you may configure the pin as an input and check if the LED is OK. Then configure the pin as an output again and turn the LED on.