UPDATE: Musical tone output working

A project log for sound_chip_AVR

Using fast PWM capabilities of some AVR MCUs to make sounds using DDS.

Ethan DurrantEthan Durrant 01/02/2015 at 20:510 Comments

It's been quite a while since I messed with this project. But the last time I did, I connected the AVR's PWM output through the Low-Pass Filter and in series with a capacitor to a 8ohm Speaker. My code took a 7-bit MIDI note code from the pins on PORTA and then was supposed to play that note from it's output. In testing in comparison with a musical tone generator on my computer, the note entered, when coming out of the AVR was always a note higher in pitch. I'm still not sure why that is, but I just did a simple fix in the code to play one note under the entered MIDI code, so the actual tone output is correct. So now my basic goal for the project has been fulfilled, but I have some Ideas to maybe extend it, such as double channels and different wave output selections for square, sawtooth, and triangle waves.

The code folder here.