| Author |
Message |
Ziko87
Joined: 30 Apr 2006 Posts: 5 Location: Siena (Ita)
|
30 Apr 2006 14:31 vs1001k |
|
|
|
|
Hello, I am a new member!
I have project a small mp3 reader with SD-Card, pic16f876 and Vs1001k!
I have realized succesfully the interface SPI (in fact the microcontroller answers
correctly and sets all the registers properly), the my problem stay in to send the
data of mp3 code. I think that there is a problem with Boot of chip, someone know
the correct sequence for put in operation correctly?
Sorry for my bad English I'm learning!
Tank you very much!
|
|
| Back to top |
|
 |
Rooftop
Joined: 28 Oct 2004 Posts: 136 Helped: 2
|
30 Apr 2006 17:36 ic vs1001k |
|
|
|
|
| I'm not sure this will help but look at http://www.microsyl.com there's mp3 project there using the same mp3 decoder chip and the source code but in avr, maybe you will get some information there...
|
|
| Back to top |
|
 |
nooknikz
Joined: 22 Apr 2002 Posts: 404 Helped: 22 Location: thailand
|
30 Apr 2006 18:03 vs1001k code |
|
|
|
|
from this web can help you. http://www.mpic3.com/
have sample code written in CCS PIC C to control the VLSI VS1001K MP3 CODEC IC
|
|
| Back to top |
|
 |
contagiouseddie
Joined: 10 May 2004 Posts: 60 Helped: 3
|
30 Apr 2006 19:24 mp3 vs1001k pic |
|
|
|
|
I have used the VS1011b version of the MP3 decoder IC. But, by the way it is only slight difference between them. Before feeding the MP3 data these are a few things you might want to check:
>> Hardware reset the VS1001k by pulling the XRESET line low for few us and pull it high. You should be able to notice a "pop" sound from the output of the IC. This is because the turning off of the analog power supply. If this test pass, proceed to the next one.
>>Do a read to any register (for example volume). Pump this read data out through UART (or anything you can think of).
>>Do a read-write-read to a register of VS1001k (the best is the volume register). If this is ok, then you not have any problem.
>>Remember when feeding MP3 data to the VS1001k, to switch the line indicating command and data (switch to data when feeding MP3 data). Also remember, to check the data request pin (DREQ) before feeding the data.
>>Also check the oscillation settings if you are using crystal other than 24.576 MHz.
Hope it works for you. All the best. You should look at the application notes at their website. [url]www.vlsi.fi [/url]
|
|
| Back to top |
|
 |
Google AdSense

|
30 Apr 2006 19:24 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
Ziko87
Joined: 30 Apr 2006 Posts: 5 Location: Siena (Ita)
|
01 May 2006 13:53 vs1001k sd card |
|
|
|
|
Thanks for the answer, it are very usefull.
I have check all that you have advise to me:
1)After have done the hardware test I've heard the famus "pop"
2)I hava read correctly the volume register
3)I can write and read correctly all the register
The unique point that function uncorrectly is the last one:
I control the DREQ, and I've set the register mode for "MSB first" bat I heard only silent
This is my routin that I use for control the device:
| Code: |
#ifndef __VS1001K_C
#define __VS1001K_C
#include "Delay.c"
#include "VsSpi.c"
#include "vs1001k.h"
void VsData(char Byte){
char count;
BSYNC=1;
for(count=0;count<8;count++){
if(Byte & 0x80){
SDATA=1;
}else{
SDATA=0;
}
BSYNC=0;
DCLK=1;
DCLK=0;
Byte<<=1;
}
//BSYNC=0;
}
void VsInit(void){
int i;
VsCommand(11, 0, 0);
VsCommand(3, 0x98, 0x00); //Not necessaire
for(i=0;i<2048;i++){
DCLK=1;
SDATA=0;
DCLK=0;
BSYNC=0;
}
}
void VsResetHardware(){
xRESET=0;
DelayMs(1);
xRESET=1;
xCS=1;
VsInit();
}
void VsResetSoftware(){
char i;
VsCommand(0, 0, 4);
DelayUs(300);
BSYNC=1;
for(i=0;i<8;i++){
DCLK=0;
SDATA=0;
DCLK=1;
BSYNC=0;
}
DCLK=0;
}
void VsCommand(char comando, char hi, char lo){
xCS=0;
VsMandoByte(0x02);
VsMandoByte(comando);
VsMandoByte(hi);
VsMandoByte(lo);
xCS=1;
}
int VsReadRegister(char address){
char Risp1, Risp2;
int FinalRisp=0;
xCS=0;
VsMandoByte(0x03);
VsMandoByte(address);
Risp1=VsPrendoByte();
Risp2=VsPrendoByte();
xCS=1;
FinalRisp+=Risp1;
FinalRisp=FinalRisp<<8;
FinalRisp+=Risp2;
return FinalRisp;
}
void VsReadByte(char address){
char Risp1, Risp2;
xCS=0;
VsMandoByte(READ);
VsMandoByte(address);
Risp1=VsPrendoByte();
Risp2=VsPrendoByte();
xCS=1;
UartPuts("Answer: ");
UartPutch(Risp1);
UartPutch('-');
UartPutch(Risp2);
UartPutch('-');
UartPuts("\n\r");
}
void Send32(char* buf){
char i;
while(DREQ==0){}
for(i=0;i<32;i++)
VsData(buf[i]);
}
#endif
|
Thanks you for the help!
|
|
| Back to top |
|
 |