barebone arduino. pin 13 has 5v high when resets. but after that is way low...

hello forum. i am making a barebone arduino, and i have the strangest problem...
i am using the following circuit :

with the only diference , that my pull up resistor, is 6k , instead of 10.
i am also using the arduino serial usb light....

now. if i connect a led in pin13. when i connect to the pc, or after the upload, the led shines, bright..
if i have a seral comunication, it works just fine.. (serial.println).
BUT, if i try to blink the led, the pin 13 does not go high at all... rether it is near 1.2v... any idea, why this could be happening???

In the code,
byte ledPin = 13;
the software is referring to D13 - this maps to physical pin 19, PB5, which is the SCK pin.

You need to find the Pin Mapping page to see the correlation between the Software names and the physical pins.

i know that >_>. dont forget that the pin itself, gets high , when the softwrae starts (the led turns on). its after that, that it dosent work for some reason..
no need to mantion, that the same is true, for all the other digital pins...
AND , i have tried 2 atmega328 pins with the same result.... (?? )

During a reset, the pins all revert to inputs, and may 'float', which may look like high output.
After your sketch starts, they remain as input until your sketch commands them to be something else.
Post your sketch, lets see what it's doing.
Make sure you have a current limit resistor between the pin and the LED. 220 ohm, 270, 330 ohm, 1K, somewhere in that range.

the sketc is the classic Blink sketch... :confused:

settra:
BUT, if i try to blink the led, the pin 13 does not go high at all... rether it is near 1.2v... any idea, why this could be happening???

What value resistor is in series with the LED?

it dosent seem to affect it... the led "shines" (very hard to see) the same, whatever resistor, or , no resistor at all...

from the above, i take it, my case is not something ussual? :stuck_out_tongue:

And you have the resistor/LED connected to physical pin 19?

settra:
... no resistor at all...

No resistor at all is not good. You may have damaged the output driver.

Please state the value of the resistor you are using, as I asked you above.

Also, which pin on the processor is the LED connected to?

220 to 680ohm... i used it without the resistor, only many tries after it did not work, so no change it was cause by this..
yes it is connected to physical pin 19.. (and whatever else pin i have tried). remember, the led DOES blink. only with ultra low brigthness...
also, when i dont have something connected, the pins have 5v(when they are high)...

any change it has something to do with the Vreg i use?? the Vreg is connected there, for external power (even though it is not connected to any external source) and its GND and output are connected to the the VCC and GND of the atmega (and hence the ftdi and USB).. also, the capacitors i used are 10uf each!

What is/measure the supply voltage?
Will the LED light up if you connect it as: +5/anode LED cathode/resistor/GND directly?
Is the pin is set to output?
Try other o/p pins.