Playing MP3 with Music Shield and WIZwiki-W7500

Dependencies:   FTPClient javakysSDFileSystem2 WIZnetInterface mbed

You are viewing an older revision! See the latest version

Homepage

Prerequisite

This example is for playing MP3 file stored in SD card on WIZwiki-W7500 and updating MP3 files from server to SD card via FTP protocol.

To implement this function, you need a Platform board, network Interface board, MP3 decoder board and SD card. Below are what we used.

  • WIZwiki-W7500 from WIZnet (Platform board and Ethernet I/F board)
  • Music shield from Seeed Studio
  • SD card

Hardware Configuration

WIZwiki-W7500 Pin map

pin map

SPI1 on WIZwiki-W7100 is for reading from or writing to SD card and pins for SPI1 are PB_0, PB_1, PB_2 and PB_3.

WIZwiki-W7500 communicates to MP3 decoder on Music Shield via SPI0 pins of which consists of PC_12, D11, D12 and D13. And PC_13, PC_14 and PC-15 are used for DCS, DREQ and RST, respectively.

D3, D4, D5, D6 and D7 are connected to 5 way navigation switch on Music Shield. When user pushes the switch to one way, a relevant pin is grounded so that he or she should make it set high at the first time.

Software

SPI Initialization

//Declaration in VS1002.cpp
VS1002::VS1002(PinName mmosi, PinName mmiso, PinName ssck, PinName ccs, const char *name, PinName mosi, PinName miso, PinName sck, PinName cs, PinName rst, PinName dreq, PinName dcs)
    : _DREQ(dreq), _RST(rst), _spi(mosi, miso, sck), _CS(cs), _DCS(dcs), _sd(mmosi, mmiso, ssck, ccs, name) {
    
    }    

//Initialization in main.cpp
VS1002 mp3(PB_3, PB_2, PB_1, PB_0,"sdc",D11, D12 ,D13, PC_12, PC_15, PC_14, PC_13);  

All wikipages