Looking for MDFLY pinout

Tumbledown

New Member
I have been following the 'mp3 playback module' posts from a couple of years ago and have some questions.
The link in there for the definition of the 20 pin connector in no longer valid, is the a valid link?

I have the MDFLY connected to a 18m2 and functioning, just.
I have copied code from that old post and ordered the mp3's on the SD card correctly but with serout from the picaxe to RX, it only plays the first file. I have put files on the SD card in different orders to no avail.
I'm not sure what pin 15 is but if I connect the serial output to it, it plays the three files over and over when the 18m2 is powered off. When the 18m2 is powered on, it plays the next song whatever it is not the selected one.
I don't seem to be able to select the file I need.
Power is clean, busy is active and clean, I've tried 3 SD cards
I would like to see what I'm missing.
 

Jeff Haas

Senior Member
I assume you're using the Tenda TDB380. Here's a link to the datasheet:

http://www.echelleinconnue.net/outils/mobio/composants/TDB380_datasheet_V2_(Tenda_Electronics).pdf

You want to refer to the section on Serial mode. Pin references below are from there.

Here are some notes on how to use it:

1. You'll want to name the mp3 files like this:
001firstsound.mp3
002nextsound.mp3
etc.

Copy the files to the SD card, then use a utility called Drive Sort at http://www.anerty.net/software/file/DriveSort.php - this sorts the FAT on the SD card. Why do you need to do this? Because the card doesn't read file names, it only plays the first file, the second file, etc. It only takes a moment to use Drive Sort and it's a major help.

I was using an old 32MB card which WinXP didn't want to format as FAT32. I swapped for a newer 1 Gig card, formatted that as FAT32, copied some files onto it, sorted via DriveSort and Tada! Music!

2. How to set up the Tenda TDB380, I used a 08M Protoboard:
- Pin 20 on Tenda board connects to V+ (for 5 volts power, which works fine)
- Pin 19 on Tenda board connects to GND and to GND of headphone jack
- Pin 18, 17 on Tenda board connect to left and right of headphone jack (see schematic of your headphone jack for connection details).
- Pin 16 is only necessary if you want the Tenda board to communicate back. I don't bother.
- Pin 15 on Tenda board (labelled RXD in the Tenda PDF) connects to the pin you're sending serial codes out of, to send serial commands to the Tenda board.

Below is some sample code, for the 08M. I used this to test communication with the Tenda, and then built upon it. Once you get the module going, it's terrific. Also I built a small board to plug the Tenda into, which has a headphone jack on the outputs and a connector in from the Picaxe. I can snap a picture if you need it.

I have more elaborate code, which keeps a playlist of six different mp3s, then plays one at a time randomly until the list is used up and then starts over. It was most recently used for a Halloween display in October. Worked flawlessly in two different props all night!

Code:
; *******************************
;    Filename: Tenda test		
;    Date: 			
;    File Version: 	
;    Written by: 		
;    Function:  Basic Tenda code for 08M		
;    Last Revision:
;    Target PICAXE: 08M on 08M Protoboard	
; ******************************* 

#Picaxe 08M

symbol SOUT = 2	 'Assigns pin2 to Tenda

setfreq m8  'Must be set to 8mhz for Serout command to work


high 2 ' Serial output pin idle-high
pause 5 'Allow module to fire up

start:
  serout SOUT,T2400,(0xEF) 'STOP module
  pause 2000                     ' Pause to let module process command
  serout SOUT,T2400,(0x02) 'PLAY song 002.mp3
  pause 10000                    'Play song for ten seconds
  serout SOUT,T2400,(0xEB) 'PAUSE playback
  pause 5000                      'Pause for five seconds
  serout SOUT,T2400,(0xEC) 'UNPAUSE playback
  pause 20000                    'Continue song for twenty seconds
  serout SOUT,T2400,(0x06) 'PLAY song 006.mp3
  pause 20000                    'Play different song for twenty seconds
  serout 2,T2400, (0xEF)      'Shuts off MP3 module and silences slight buzzing output
  end
 

Tumbledown

New Member
setfreq m8 'Must be set to 8mhz for Serout command to work


serout SOUT,T2400,(0xEF) 'STOP module
pause 2000 ' Pause to let module process command
serout SOUT,T2400,(0x02) 'PLAY song 002.mp3

I'll try setting to 8mhz and I was using ($EF), I'll try the hex form.
Thanks for the replies.

I would still like to know what pins 1-14 do on this board.
 

Tumbledown

New Member
Jeff,
Here's a portion the test code,
I can control the file played now, thanks a lot, BUT my LCD output no longer works.
What effect does the M8 freq command have on the serial out to the LCD?

#PICAXE 18M2
symbol LCD = C.3 'pin 2 - output to LCD display
symbol mp3 = B.5 'pin 11 MP3 output
Init: SETFREQ M8
High MP3
pause 500
main:
serout LCD,N2400, ("vpf 001.mp3")
serout MP3,4800,($EF) 'stop MP3 player
serout MP3,4800,(0x01)
 

Tumbledown

New Member
I found that I have to reduce the LCD baud to N1200 and all my pause times have to be doubled.
Curious-er and curious-er.
 

Jeff Haas

Senior Member
You'd have to tell us what LCD you have and how it's hooked up. Also, if you want help on a program, post all of your code (and use the "CODE" command available in the Advanced post editing) - it's hard to help with only a partial listing.

But since you've solved most of it, it looks like you're on your way.
 
Top