|
CONTENTS Home Projects Electronics Graphics Java Java Mobile Android Other Stuff Resume Music Pictures Contact |
Playing Sound From An SD/MMC CardRelated pages on www.mikekohn.net: MSP43F169 Guitar Proc, MSP430G2231 Guitar Proc, 6581 Sound Chip, Floppy Music, Metal X Mod, YJM Mod, DAC Sound, SD/MMC, MSP430 Assembler October 30, 2009 Introduction This is an Atmel ATmega168 circuit demonstrating how to grab data off an SD/MMC card, send that data out through an SPI DAC connected to an amplifier, and how to use the A/D converter with an infrared proximity detector. The way I have it programmed here, when the proximity detector detects something geting close it plays 1 sound. When the proximity detector no longer detects the object it plays a second sound. Since it's halloween tomorrow I figured I'd make it a halloween theme. There is a video of it working here:
This project is similar to an earlier one I did except that project used a parallel DAC and an i2c eeprom chip. This project can be viewed here DAC sound player. Problems Not SD/MMC related, I'm experiencing horrible noise out of the LM386 amplifier when the infrared proximity sensor is connected to the circuit. If I disconnect the 5v power supply from the circuit the noise heard in the circuit above goes away. I probed the circuit with my oscilloscope between the DAC and the amplifier and the signal is perfectly clean so I guess it's somewhere in the amplifier. I tried some capacitors too but had no luck with that. My second problem seems to be that the SD card doesn't honor the /CS pin. In that I mean, when I send data out of the SPI with the DAC selected, the SD card seems to shift the next byte in/out. So I wrote all my samples to the SD card twice and assume only 128 two byte samples per flash block. Pictures
Source code
Copyright 1997-2012 - Michael Kohn
|