Shop OBEX P1 Docs P2 Docs Learn Events
MP3 Mini SD Control via 2 line serial mode — Parallax Forums

MP3 Mini SD Control via 2 line serial mode

tcicatellitcicatelli Posts: 8
edited 2012-07-25 07:17 in BASIC Stamp
Hi-

I have a WTV020-SD module. This is an audio module that will play sounds stored on a micro SD chip with the naming convention of 0001.a4d, 0002-a4d, thru 0512.a4d. You can select the sound you want to play by sending binary data via a 2 line serial connection. The binary you need to send is:

0000000000000000 thru 0000000011111111 which represents filename 0000 thru 0512. The module requires the use of a 5ms reset followed by the binary data being transmitted thru CLK and DI. If I'm able to send the binary data, the next step would be to bring the Play/Pause Pin low.

I have the following pins assigned on my BS2:

P0 Reset
P1 CLK
P2 DI
P3 Play

I can bring reset low, but I'm not sure of the code to send the above binary data from the stamp.

If anyone can help, I'd appreciate it. The timing waveform is on page 11 at this link:
http://www.elechouse.com/elechouse/images/product/MP3%20Sound%20Mini%20SD%20Card%20Module/WTV020%20datasheet%20V1.8.pdf

Thanks,
-Tom

Comments

  • GeeksGoneBadGeeksGoneBad Posts: 100
    edited 2012-07-25 05:48
    hey - did you ever figure this one out? I have a WTV020 on the way and plan on using it to trigger a sound for my Halloween project :)
  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-25 07:17
    It looks like you'd use a SHIFTOUT statement to send a 16-bit (word) value to the WTV020-SD. Look at the description of the SHIFTOUT statement in the Stamp Manual.

    From the datasheet you provided, it looks like they also require the use of a /CS line to make a "standard" SPI interface. You'd do the RESET pulse, then bring /CS low before doing the SHIFTOUT, then bring /CS high to end the transfer. There are examples of other SPI devices in the StampWorks Manual and in some of the Nuts and Volts Columns.
Sign In or Register to comment.