Last week I started this project and I made some experiences.
I took an SD-MicroSD-Card Adapter and wired it to my breadboard.
I had to connect it directly to the battery (3.6V lithium cell) and not
behind my circuit protection diode, because the voltage drop was too high
when operating and my MCU run wild.
I took the SD card and SPI code from the following webinar:
http://www.freescale.com/webapp/sps/site/training_information.jsp?code=WBNR_SDCARDREADER_S08JM&fsrch...
This code was for the flexis MCU series but it was very easy to port it for the QG8.
Then I wrote with "dd" for windows an 8-Bit sample in raw format to a MicroSD card
and I could hear sound with some kind of distortion.
I found that the function for reading a 512 byte block was too slow. I have time for 46.000 MCU cycles and it took 60.000 cycles.
But now I realized that my approach was too complicated. Instead of filling a 128 byte buffer
and reading every SD sector four times I can read byte for byte in the timer overflow interrupt
by SPI, because SPI defines no timing and the SD card already buffers the data.
I'll check this aproach in the next days.
Bye,
Message Edited by Superberti on 2009-08-31 12:49 PM