Merge pull request #2829 from tmrttmrt/tmrtmrt/Fixes#2825_MEGA_2560_audio_output_not_working

tmrtmrt/Fixes#2825_MEGA_2560_audio_output_not_working
This commit is contained in:
Bertrand Songis
2015-09-05 11:53:50 +02:00
2 changed files with 4 additions and 5 deletions
@@ -62,11 +62,10 @@ inline void boardInit()
OCR2A = 156;
TIMSK2 |= (1<<OCIE2A) | (1<<TOIE2); // Enable Output-Compare and Overflow interrrupts
// Set up Phase correct Waveform Gen. mode, at clk/64 = 250,000 counts/second
// (Higher speed allows for finer control of frequencies in the audio range.)
// TIMER4 set into CTC mode, prescaler 16MHz/64=250 kHz
// Used for audio tone generation
TCCR4B = (1<<WGM42) | (0b011 << CS00);
TCCR4A = (0b01<<WGM40);
TCCR4A = 0x00;
#if defined (VOICE) // OLD FROM GRUVIN9X, TO REWRITE
// SOMO set-up