LED on ATMega328 dimmer than expected

atmegaledmicrocontroller

I'm in the process of transitioning from Arduino work to just using bare microcontrollers, and I've got a question that might be quite basic (but I've searched around and haven't found an answer for it yet).

I have an LED that I know should be quite bright when powered–and is when hooked up to an Arduino–but is very dim when hooked into an atmega328 pin. I'm powering the chip through the SparkFun Pocket AVR Programmer, and the LED is being powered through a resistor.

Is the voltage output from the atmega when powered by the programmer much lower than that of an Arduino? Am I doing something wrong?

Best Answer

Verify that the pin is configured as an output. If configured as an input, it will be powered by a weak pull up inside the MCU rather than from the much stronger output drive.