Page 2 of 4

Re: About 1053 - Please check my schematic

Posted: Mon 2011-02-07 17:52
by demonoR
Hi there,

I soldered all those stuff, micro sd carc seems to be working. But somehow my vs1053 is not working, maybe I made some mistakes in the code, I made some test program, to send few data to the decoder. If you find mistakes please tell me.

Here is my final schematic, and the code.

CODE
http://ideone.com/Sg2VS

SCHEMATIC
http://img220.imageshack.us/img220/5139/sch150dpi.png

Re: About 1053 - Please check my schematic

Posted: Thu 2011-02-10 16:10
by demonoR
Ah, one more thing, I accidentally soldered 100n capacitor in between RCAP and ground, instead of 1u. It can be a problem?

Re: About 1053 - Please check my schematic

Posted: Fri 2011-02-11 14:45
by Panu
Hi!

It can increase the noise a little, but hardly noticeably.

-Panu

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 18:12
by demonoR
Hi there,

Finally I launched that decoder. I ran sine wave test, looks ok.

I tried to run mp3 but it was like in slow motion (44.1 kHz 320kbps..). I think my micro controller is on 1 Mhz or something like that. I tried to use a lower quality mp3 something like 56 kbps and lower frequency and it was not bad, just some weird noices. Hmm I changed my fuse bits on 8Mhz or something like that and my songs were like fast forwarded.

Strange, maybe you know what can be a problem?

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 19:10
by Coltfish
demonoR wrote:Hmm I changed my fuse bits on 8Mhz or something like that and my songs were like fast forwarded. Strange, maybe you know what can be a problem?
Sounds like you don't monitor the DREQ-pin correctly. Only send stream data to the vs1053 when DREQ is HIGH. And only send 32 Bytes at a time, then check DREQ state before sending the next block of data.

How did you setup the SCI_CLOCKF register?

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 20:12
by demonoR
Yeah, I made a check of dreq pin, now sound looks weird, it is slow, eh, faster then before, but still some strange trash inside music.

About that register you mentioned, I do not set it? I should? My micro-controller works on 8 MHz and vs1053 on 12.288 MHz, How should I set it?

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 20:40
by Coltfish
demonoR wrote: About that register you mentioned, I do not set it? I should? My micro-controller works on 8 MHz and vs1053 on 12.288 MHz, How should I set it?
0x8800 should be a good value for SCI_CLOCKF in your case.

Perhaps you should take a look at this thread, wich will show you the basics:
viewtopic.php?f=11&t=65

You should try to get low bitrate files working first so you can be sure your microcontroller is able to feed the vs1053 fast enough.

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 21:10
by demonoR
Yeah, thanks man, just tested, mp3 192 bitrate worked fine! Now I will test other formats.

One more thing, have you tried FLAC? I saw some plugin, have you tested that?

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 21:23
by Coltfish
demonoR wrote:One more thing, have you tried FLAC? I saw some plugin, have you tested that?
Yes, did that with a PIC32 (80 MHz) just to try, worked fine.
You can try to do that with your ATMega, but it might be pretty busy feeding data. The data rate is high, so you must be sure you can feed fast enough, otherwise you will get an interrupted audio output.

Re: About 1053 - Please check my schematic

Posted: Tue 2011-03-15 22:25
by demonoR
yeah, tested on every file 320 bitrate mp3 worked fine.

I tried to send 1411.2 Kbps wave NOT WORKED I mean I got lagged sound.

So if wave is not working I think flac will not work..

so maybe my atmega with 8MHz internal clock is too slow? Interesting is it possible to send data with atmega and external 16Mhz?? I mean 16 MHz external will be enough?