I have a custom ATTiny85 PCB with LEDs connected to GPIOs (PB0-4) through current-limiting resistors. All ports fade LEDs smoothly except PB2, which only switches on/off with no intermediate states. The circuit is identical for all LEDs, ruling out hardware issues. I suspect this is related to PB2's specific capabilities.
#define pin PB1
void setup() {
pinMode(pin, OUTPUT);
}
void loop() {
for(int i = 0; i < 256; i++) {
analogWrite(pin, i);
delay(10);
}
for(int i = 255; i >= 0; i--) {
analogWrite(pin, i);
delay(10);
}
}
- MCU: ATTiny85
- IDE: Arduino
- All LEDs use identical circuits
- Other ports (PB0,1,3,4) fade normally
Is there something specific about PB2 that requires different configuration for PWM functionality? How can I enable proper fading on this pin?

