X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/046fff2aff485c550e55125bb059e001e39a6730..c49bdcb7c930f2d0e0cf6887b3326f9e8f7f37b3:/Demos/Device/LowLevel/AudioOutput/AudioOutput.c diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 28e57c48c..b9c306cc1 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -79,9 +79,9 @@ void EVENT_USB_Device_Connect(void) LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING); /* Sample reload timer initialization */ - OCR0A = (F_CPU / AUDIO_SAMPLE_FREQUENCY) - 1; + OCR0A = (F_CPU / 8 / AUDIO_SAMPLE_FREQUENCY) - 1; TCCR0A = (1 << WGM01); // CTC mode - TCCR0B = (1 << CS00); // Fcpu speed + TCCR0B = (1 << CS01); // Fcpu/8 speed #if defined(AUDIO_OUT_MONO) /* Set speaker as output */