attiny85 sound circuit for sonic screwdriver

Hey guys, I decided I wanted to make a sonic screwdriver with sound, and I knew that the attiny85 is good for projects like these. I use the latest arduino software and to programme the chip I use a tiny AVR programmer. So I practised programming using the blink sketch, and it worked, so I proceeded to wire up the sound circuit using a speaker from some headphones (I tried with 2 different ones) and programmed the chip and…nothing, any idea what in doing wrong?
Here’s the code

int count;
void setup()

{

pinMode(0, OUTPUT);

}

void loop()

{

count = count+1;

if(count<5)

{

tone(0,1471);

delay(10);

tone(0,1575);

delay(5);

}

else

{

tone(0,1470);

delay(10);

tone(0,1575);

delay(5);

if(count>10)

{

count=0;

}

}

}

How is the "sound circuit" wired? Is the circuit known to work with a '328p-based board?

I would honestly not be surprised if there were problems making this work. The hardware timers on the '85 are really weird.

http://cdn.instructables.com/FJC/85B5/I9SN0TXM/FJC85B5I9SN0TXM.MEDIUM.jpg

Here’s an image of the sound circuit, the speaker is connected to ground and PB0, the LEDs positive wire connects to VCC, the LED’s negative wire connects to ground of the attiny85, a switch is connected at the LED’s positive wire and the other side to the positive of the battery, and the negative of the battery is connected to ground of the attiny85.

I wasnt really expecting this to work, but it would be nice if it did, I’ve spent a load of money on this project and it would be a big downside if the sound didn’t work, so, any ideas on what I could do

As for the 382p based board, Ive seen this circuit with different codes work with success

If your driving a speaker then you will probably need to amplify the signal.

I slightly tweaked your code and loaded it on a Mega (closes MCU to hand for me) and if you listen with ear bud headphones then you can hear it.

#define outputPin 2
byte count;

void setup()
{
  pinMode(outputPin, OUTPUT);
}

void loop()
{
  count++;
  if(count < 5)
  {
    tone(outputPin,1471);
    delay(10);
    tone(outputPin,1575);
    delay(5);
  }
  else
  {
    tone(outputPin,1470);
    delay(10);
    tone(outputPin,1575);
    delay(5);
    if(count > 10)
    {
      count = 0;
    }
  }
}