PWM not working correctly - pls help.

Hi,

I am sure scheme is ok. Code looks good too. I tryed to slow down fade in and out and it looks that "fade out" of all LEDs are smooth (LEDs brightness slow from 100% to 0% better but "fade in" is jumped to 50% and than slowly increase to 100%. I tryed even different LEDs. I think PWM is set fast so what is default rate of PWM at Arduino? 10kHz? 1kHz? Maybe if I will change it to lower setting ... ??? Thanks for tips.

Code:

int tlacitkoMaska = 0; // button value
int hodnota = 1; // PWM value

void setup() {
pinMode(3, OUTPUT); // PWM
pinMode(7, INPUT); // button
}

void loop() {

zacatek:
analogWrite(3, hodnota); // PWM pin 3
for (int c=0; c <= 50; c++) { // testing button here (50*20ms = 1sec)
tlacitkoMaska = digitalRead(7);
if (tlacitkoMaska == HIGH) {
goto preruseni;
}
delay(20);
}

analogWrite(3, 0); // PWM pin 3
for (int c=0; c <= 100; c++) { // testing button here (100*20ms = 2sec)
tlacitkoMaska = digitalRead(7);
if (tlacitkoMaska == HIGH) {
goto preruseni;
}
delay(20);
}

if (hodnota < 255) hodnota = hodnota + 1; // increase brightness of LEDs here
goto zacatek;

preruseni:
analogWrite(3, 0); // turn off leds here
hodnota = 1; // reset PWM to value 1
goto zacatek; // goto beginning

}