Problem Outputting 2.5 Khz Signal ATTiny85 with Digispark
You can do this on timer 0 in CTC mode. If your MCU is running at 8MHz you need a prescaler setting of 8 to reach the frequency range you are after. Inverting the frequency formula from the datasheet gives you the correct counts for the overflow. We do this separately using our favorite language (mine is Haskell):

module Main (main) where

f_cpu = 8e6
freq n c = f_cpu / (2 * n * (1 + c))
count n f = f_cpu / (f * 2 * n) - 1

main :: IO ()
main = mapM_ (print . round . count 8) [ 2e3, 2.5e3, 3e3 ]


which gives us 249, 199, 166 respectively. We are now ready to write the program:

#include &lt;avr/io.h&gt;
#include &lt;util/delay.h&gt;

void setup()
{
    TCCR0A = _BV(WGM01) | _BV(COM0A0);  // CTC mode w toggle channel A on compare match
    TCCR0B = _BV(CS01);                 // clock select prescale = 8
    DDRB |= _BV(0);                     // enable channel A = OC0A (PB0) output
}

void loop()
{
    static uint8_t i = 0;

    switch (++i &amp; 0x3)
    {
        case 0: OCR0A = 249; break;     // 2kHz
        case 1: OCR0A = 199; break;     // 2.5kHz
        case 2: OCR0A = 166; break;     // 3kHz
        case 3: OCR0A = 199; break;     // 2.5kHz
    }

    _delay_ms(2000);
}

int main()
{
    setup();
    for (;;)
        loop();
}


This will cycle through the frequencies 2, 2.5 and 3kHz in 500Hz steps 2 seconds each. I have tested on a bare ATTiny85 running at 8MHz and measured it on my scope: 2.01kHz, 2.52kHz and 3.01kHz is what I get.

If you can't use timer 0 it should be straightforward to achieve the same on timer 1 (it has more prescaling options and wider range).