I have an ATtiny85 that is connected to a 10K pot and has 2 LEDs. One LED is HIGH all of the time and the other fades in and out depending on the position of the potentiometer. The odd thing is that when the potentiometer mapping to the PWM LED is completely on (255) it is about 50% as bright as the LED that is always on. They have the exact same resistor and when I switch the LEDs the same effect happens so it is not an issue with the LEDs. Additionally I have tried it with the internal 8mhz clock and an external 16mhz clock with the same effect. Any thoughts?
Here is my code
pinMode(1,OUTPUT); // led is always on
int sensor_value = analogRead(A1);
int output = map(sensor_value,0,1023,0,255);
analogWrite(0,output); // this led is never as bright