i have a simple LED circuit connected to the Atmega 1284P. I have the LED on PC0 to ground. When i set PC0 to high, it supplies 5V (the same as Vcc) without a load (the LED). With the LED connected, the voltage drops to 1.5V. According to the datasheet, a port can handle 40mA of current.
Would it be better to directly connect the LED (of course with a resistor) to 5V (Vcc) and then to PC0 an let it light when PC0 is low?
Is the voltage drop in the described circuit normal?
Sorry for that easy question, but i have searched several forums an tutorials.