user61889: I can get PB4 to work but not PB3 on my ATtinny85.  I'm just lighting up an led (with 150 ohm resistor) (using internal 16mhz)
void setup() {
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);

}
void loop() {
  analogWrite(3, 15);//does not work
  analogWrite(4, 15);//works
  delay(500); 
  analogWrite(3, 0);//does not work
  analogWrite(4, 0);//works
  delay(500);
}



user23841: The hardware PWM is only suported on pins with output compare altenate function on it. The pinout in your question shows Attiny13 but the rest of your question is about Attiny85, which has different capabilities from Attiny13

As you can see, only pins with PWM capability are PB0, PB1 and PB4

61889: <p>I can get PB4 to work but not PB3 on my ATtinny85.  I'm just lighting up an led (with 150 ohm resistor) (using internal 16mhz)</p>

<pre><code>void setup() {
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);

}
void loop() {
  analogWrite(3, 15);//does not work
  analogWrite(4, 15);//works
  delay(500); 
  analogWrite(3, 0);//does not work
  analogWrite(4, 0);//works
  delay(500);
}
</code></pre>

<p><a href="https://i.stack.imgur.com/w0Blh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w0Blh.png" alt="enter image description here"></a></p>
 23841: <p>The hardware <code>PWM</code> is only suported on pins with output compare altenate function on it. The pinout in your question shows <code>Attiny13</code> but the rest of your question is about <code>Attiny85</code>, which has different capabilities from <code>Attiny13</code></p>

<p><a href="https://i.stack.imgur.com/ux52y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ux52y.jpg" alt="Attiny85 pinout"></a></p>

<p>As you can see, only pins with <code>PWM</code> capability are <code>PB0</code>, <code>PB1</code> and <code>PB4</code></p>
