Sign up today and be notified when another post about planes is made!We promise not to spam you and not to give away your mail address.
I haven’t been posting too much, and most of this has been the lack of anything interesting (for me at least). Administrating “The UAV Project” had been quite a hassle. Not to mention, the years of project-buildup have more or less deprived me of my primary source of joy. At least I know now that I really don’t like administrative things… with that said, I guess it doesn’t come as much of a surprise that I resigned. It was quite a difficult decision.
But anyway, let’s talk about SD card WAV players!
My idea of having an SD card WAV player comes from the Intel chimer that we used to have. (Not a video of us!) And I wanted to implement the same thing — but with Nyan Cat. (This is a customary thing for me — after my Nyan Cat Soldering oven.)
Recently, I have looked at an “electrical handiwork” from ChaN called the SD8P. http://elm-chan.org/works/sd8p/report.html ChaN implemented an SD card playing AtTiny85 thing!
And I kind of did the same thing but with my electrical handiwork materials… albeit, I had a lot of bugs along the way (they were caused by my ignorance.)
First of all, apparently SD cards like to be power cycled in just the right manner before they will cooperate and initialize… (I must confess that I don’t actually know about the operation of SD cards beyond what I’ve read in ChaN’s code.) Otherwise, ACMD41 (send HCS info and activate the card INIT process) will always return with an uninitialized card. With some cards, (a particular 2Gb card that I had lying around my house), it is acceptable to keep the card plugged in while powerup. With the particular SHDC 32Gb card that I was using, this is not the case.
I should note that ACMD41 should eventually lead to an initialized card after a few attempts. This is not the case with this particular (32Gb) card with this particular power cycling.
Unfortunately, I don’t actually have a picture of the SD card working correctly…
This leaves the problem of my system clock not being correct. ChaN set the registers to use the in-system PLL which enables the AVR core to run at 16MHz. I forgot to set the registers in the correct manner. (Douh!) So I had my files play at half the speed that they were supposed to play at! (I fixed it by making my files exactly two times faster!) Here is a horrible self-promoting Youtube video with such fixes.
Sorry my voice is much louder than the actual sound device. This is to be fixed with “boost converters and insanity” in an upcoming version. It should be noted that sharp square wave edges make for very good boost conversion. (I should also mention that I concatenate ” and insanity” to many strings that I find interesting. I haven’t concatenated “UAV’s” and ” and insanity” for quite a while, but I may just be salty.)
You can expect a (hopefully unbearably) louder version of this along with a CdS photocell at a later date. (Next week if we want to be very positive thinkers!) (Maybe I’ll even add in power management and insanity!)