From dc68de15b69c2064b1b14d00659aa91054cccbe1 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 12 Oct 2009 05:59:55 +0000 Subject: Make Audio device demos compatible with AVRs running at 16MHz instead of 8MHz. Fix up demo documentation device compatibility list to be as general as possible to reduce changes required as Atmel releases more devices within the same USB AVR series. --- Demos/Device/ClassDriver/AudioOutput/AudioOutput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Demos/Device/ClassDriver/AudioOutput/AudioOutput.c') diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c index a95e43fd57..3648b6ea78 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c @@ -136,9 +136,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 */ -- cgit v1.2.3