Show Posts
Pages: 1 ... 8 9 [10] 11 12 ... 15
136  Using Arduino / Displays / Re: Do LCDs just stop working? on: August 09, 2012, 04:03:38 am
Without a datasheet for you specific LCD its impossible to imagine what could be wrong. However, I've had a problem with a 16x2 display before where one of the data lines was shorted to ground, causing that bit to always be low. It still managed to initialize but all the characters were jumbled. Might be helpful to check the traces.
137  Using Arduino / Storage / Re: Accessing SD card at higher speeds. on: August 09, 2012, 03:02:31 am
>What sort of arduino are you using?
I'm not actually using an arduino. I'm using an ATxmega256D3 on a custom board.

>It could be that your SD card can't go faster. Have you tried another one?
I've tried a 16MB card but it didn't work at any speed (I think it's getting FAT12 formatted instead of FAT16). I also tried a 128MB miscroSD card in an adapter, but it didn't work at any speeds either. My current working card is 512MB if it makes a difference.

>What class of SD card do you have?
If by class you mean speed class then all I know is that there are no high speed marking on it (like these: https://www.sdcard.org/developers/overview/speed_class/host-marks.png). If by class you mean SD vs SDHC vs SDXC, its just plain old SD. The only useful info on the card is SD-M512 which led me to this "datasheet", http://datasheet.octopart.com/SDM512-Toshiba-datasheet-10124.pdf

If the card couldn't go faster then I assume it wouldn't even initialize at 8MHz (like it fails to at 16MHz). The fact that I get 99% of the data back correctly leads me to believe that it's just busy or something and that I have to wait for it. Although it certainly could just be the max SPI speed of the card.

Which leads me to the question, has anyone ever attempted to use an SD card in SD mode (which I assume is faster) on an arduino? Or is it far too complicated/fast for a small MCU to keep up?

Also I just read this: "When the card encounters a data retrieval problem, it will respond with an error response (which
replaces the expected data block)
". This is likely whats happening right now. I'll read up some more on it.
138  Using Arduino / Audio / Re: MP3 decoding code, NOT realtime on: August 08, 2012, 07:00:06 pm
ATxmega256D3, the big brother of ATmega. http://www.atmel.com/devices/atxmega256d3.aspx?tab=documents
139  Using Arduino / Storage / Re: Accessing SD card at higher speeds. on: August 08, 2012, 06:57:13 pm
Ok, I took out the resistors. Made no difference.
140  Using Arduino / Audio / Re: MP3 decoding code, NOT realtime on: August 08, 2012, 06:36:25 pm
@Magician So I'll read a smaller chunk. If I remember, one "page" of mp3 data is about 1K. Even if it's bigger, I still have 15K of RAM to spare.

@frank26080115 A separate DAC gives me the ability to create and send waveforms directly from the MCU as well. If I decide to implement something like a low frequency arb. wave generator then it will be easier to send the data directly to the DAC rather than packing it up into a format that the decoder will understand just for it to be decoded again.

@Grumpy_Mike It's certainly not the best solution to the problem, but for this low cost, low speed application I'm not going to complain. Worst comes to worst, I'll use a bigger SD card with wav files and try to make a fat32 compatible library.
141  Using Arduino / Audio / Re: MP3 decoding code, NOT realtime on: August 08, 2012, 06:16:46 am
How are you planning to output audio?
http://www.analog.com/static/imported-files/data_sheets/AD5663.pdf
I have another topic in the audio section talking about it, as I'm not sure which SPI mode to use to talk to it.
142  Using Arduino / Audio / Re: MP3 decoding code, NOT realtime on: August 08, 2012, 05:36:22 am
I wanted to keep costs down and board layout simple. Seeing as it doesn't have to be realtime, software seemed like a fine solution
143  Using Arduino / Storage / Re: Accessing SD card at higher speeds. on: August 08, 2012, 04:36:37 am
I wasn't sure what the input impedance of the SD card was, hence the resistors. I'll just omit them completely then.
144  Using Arduino / Storage / Re: Accessing SD card at higher speeds. on: August 08, 2012, 04:07:36 am
As I mentioned in the original post, I'm running the MCU at 3.3v
145  Using Arduino / Audio / Re: MP3 decoding code, NOT realtime on: August 08, 2012, 04:05:33 am
Quote
Why does it have to be on an arduino?
It's for a handheld device (think iPod touch) that I'm working on. All of the data for this device (images, songs, text files, etc.) will be stored on an SD card. Every time I want to listen to a song, I'll decode it, play it, and then erase the decoded version. If all my songs were stored as wav files then I wouldn't be able to store nearly as many.
146  Using Arduino / Storage / Re: Accessing SD card at higher speeds. on: August 08, 2012, 03:37:09 am
Ha, something inside of me was saying that 2K was too big as well. I'll desolder them and put in some 220 ohm ones tomorrow. But shouldn't they only affect writing? Like I said, there's no resistor on MISO.
147  Using Arduino / Audio / Re: AD5663 DAC for audio reproduction on: August 08, 2012, 03:29:11 am
While it's true that I haven't tested how long it takes to open the SD card, read a page, and close it, (and now that I think about it it probably does take significantly longer than continuous reading) I can always use the second SPI port for the DAC (probably should have also mentioned I'm using an xmega smiley) and read continuously off the SD card. In that case I'm also not limited to mode 0 or 3. Thanks for the heads up though. Luckily my second SPI port isn't occupied.
148  Using Arduino / Storage / Accessing SD card at higher speeds. on: August 08, 2012, 03:13:36 am
So far the highest SCK speed I can use and still ensure reliable data transfer (specifically reading) is 4MHz. At 8Mhz I get about 99% of the data read correctly off the SD card, but every now and then (always in the same place in the file I'm reading) I get a kilobyte or so of 0xFF instead of the actual data. At 16MHz the SD card won't even initialize. So my question is, is there anything I can do to increase the reliability of my connection so that I can get 100% integrity at 8Mhz? I'm running at 3.3v and the SD card is connected to the SPI pins through 2K resistors for current limiting (except for MISO). I'm also using a very basic custom SD library so that I can read as fast as possible. My guess is that the SD card is busy at the times when it gives me 0xFF so checking if it's busy before reading might solve the problem but there doesn't seem to be a busy bit in any of the SPI registers. I already check if bit 7 of the status register is high before proceeding to read anymore data. It might just be that the data is lost somewhere between the SD card and the MCU though. However, the fact that I get bad data in the same place every time really befuddles me.
149  Using Arduino / Audio / Re: MP3 decoding code, NOT realtime on: August 08, 2012, 02:07:47 am
Thanks for the responses! It's certainly going to take a while to combine and port all this code to an xmega but I'm sure the results will be worth it.
150  Using Arduino / Audio / MP3 decoding code, NOT realtime on: August 07, 2012, 10:53:29 pm
Does anyone have code for decoding MP3 files into PCM? I don't need to have the conversion go on in realtime as the audio is playing, just something that can read an MP3 (in small chunks of course)into memory from an SD card and convert it to PCM so that I could store it in another file for later playback. If not, can someone direct me to an article about decoding huffman code? (which is what most of the MP3 is made up of as far as I can tell)
Pages: 1 ... 8 9 [10] 11 12 ... 15