Guys,
I managed to play hello.mp3 from SDcard already,
but it's not saying hello....but hellp ?
is it about bit rate or my code isn't right yet ?
Please have a look on the function I have created,
thanks
void PlayMP3(){ uint16_t j; FRESULT fr; /* FatFs return code */ char vs_init,line[512]; /* Line buffer */ UINT num_read,k,count; uint8_t a_byte; int i,p; BYTE temp_buffer[100]; VS1003B_Init(); usart_pstr("\n \nEND Reading hello.mp3 file \n"); /*TESTING READING FILE END*/ /* - This is a special VLSI Solution test header - */ /* - that starts a sine sound. It's good for - */ /* - testing your code and the chip. */ VS1003B_Delay(); VS1003B_XDCS_H(); _delay_ms(500); /* 500 ms delay */ /* Stop the sine test sound */ VS1003B_XDCS_L(); VS1003B_Delay(); VS1003B_XDCS_H(); _delay_ms(500); /* 500 ms delay */ usart_pstr("Sine wave test 's stoped, change to SPI High! \n"); VS1003B_XDCS_L(); // Pull XDCS low if (bit_is_set(VS1003B_PIN,VS1003B_DREQ)) { usart_pstr("\n DREQ = 1 \n \n"); }else { usart_pstr("\n DREQ = 0 \n \n"); } for (i=0; i<2048; i++) { while (bit_is_clear(VS1003B_PIN,VS1003B_DREQ)); // wait here until DREQ is high again VS1003B_WriteByte(0); } VS1003B_Delay(0xffff); // Wait until SPI transfer is completed _delay_ms(500); usart_pstr("VS1003 AND ATMEGA128 SAYING HELLO! \n \n" ); }