X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/be9d0a5aa97c84cc8723f69f2b88576965e386aa..dc68de15b69c2064b1b14d00659aa91054cccbe1:/Demos/Device/LowLevel/AudioInput/AudioInput.c diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index a01c6729c..572e307b0 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -84,9 +84,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 } /** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via