This is embarrassing to ask, but...
I have an ATMEGA8's GPIO pin as an output. The output is connected to a 360 ohm resistor that is in series with a 3mm LED, whose GND pin is terminated to GND. The system is powered by a 5V DC source.
The led VERY dim for some reason. The GPIO pin's output voltage is 4.89V. The voltage across the resistor is 1.68V. Same for the LED.
So, as a test instead of the GPIO source the power to the LED, I have the resistor connected directly to the 5V. The voltage across the resistor is 2.9V. And the voltage across the LED is 1.94V. This time the LED is bright.
The GPIO pin is sourcing enough voltage to me. But why the LED is so dim????