Upload
robialamsyah
View
148
Download
19
Embed Size (px)
DESCRIPTION
Data sheet
Citation preview
www.tendaelectronics.com TDR025
Playback & Recording Module Model :TDR025 Datasheet V1.0 Date : 2009-10-11
TDR025 Playback & Recording Module
2
1. Features Description >Module support MP3 ,WMA,WAV ,MIDI
Decodes MPEG 1&2 audio layer III (CBR+VBR+ABR) WMA 4.0/4.1/7/8/9 all profiles (5-384kbit/s) WAV (PCM +IMA ADPCM ,General MIDI/SP-MIDI files
>Up to 48KHz playback frequency rate and 16KHz recording frequency rate >Easy to update the files get the recorded file from the memory card >Module can be controlled by MCU or PLC controller to satisfy many applications >32Mb SD card can record more than 2 hours , module support 2GB maximum > 8 types operating mode for users > Support all range MPEG 1&@ audio layer 3 (ISO11172-3) coding ( include CBR ,
VBR ,ABR) , and WMA , WAV also MIDI > DAC 18 bit ,Dynamic range 90dB , SNR 85dB >On-board Mic for recording >Support Auto-record and MCU to control record >Support 32Mb to 2Gb MMC ,SD,Mini SD,TF card. >Memory card should format to FAT16 format >Maximum 500 Folders and 60000 files in each one > Multiple Operating mode to satisfy user requirement >Support Auto play function , no need special files name >0 to 250 level smoothy volume , volume can be control via serial port , the volume value
can be checked via serial port , there are 16 voluem levels by Key >Size 57mm * 71.5mm >Operating power DC 3.7V to 9.1V >Direct dirive 32 ohms headphone and external ammplifer > On-Board EEPROM , can read and write via serial port >Module can connect to 3.3v or 5V MCU > Module working status and playing schedule can catch by command via serial port > Can control the module via serial port als by J2 pins at the same time > When the module working in Mode 2 , have 8 GPIO ( fully compatible with MCS-51) ,
can read I/O value and write GPIO , accomplish periphery controlling 2. Electronical Parameter ( Test under DC 5V power condition) Parameter Min. Typ. Max. Unit Storage Temp. -65 150 Operating Temp. 0 70 Power Voltage 3.7 5 9 V DAC Resolution 18 Bit Total Harmonic Distortion 0.1 0.3 % Dynamic Range 90 DB SNRFull scale signal 70 DB Separation 50 75 DB
TDR025 Playback & Recording Module
3
Gain Offset -0.5 0.5 DB Frequency Response -0.1 0.1 DB Output signal peak 1,3 1.5 1.7 Vpp Audio Output Load Resistance 16 30 Audio Output Load Capacitance 100 PF Idle Current 29 mA
Current (128kbps@44KHz,32 ohms,maximum volume)
45
MA
Current(320kbps@48KHz,5V,32 Ohms ,maximum volume)
54 mA
VIL -0.5 1 1.3 V VIH 1.5 1.75 5 V VOL 0.2 0.3 V VOH 1.8 2.1 V P20-P27 trigger time 20 ms TRST 10 ms
2. Working Mode Introduction
In the Memory directory , there should be a folder Config , and a config.txt file in this folder. Put different number in the txt file , the module will works in different mode as follows
Working Mode and Config number
Mode Mode 1 Mode 2 Mode Mode 4 Mode 5 Mode 6 Mode 7 Mode 8 Config 1 2 3 4 5 6 7 8
Mode 1 : Serial Port with Key interface
Put number 1 in the config file , after power on the Module , it will work in Mode 1.
In this Mode , Module can be controlled by MCU via Serial Port or Keys connect to J2 pins .
TDR025 Playback & Recording Module
4
Once Module powered ,will wait for the serial command to control playback or reocrding . Playback also can be controlled by keys connected from J2 connector .
Mode 2 : Serial Port with GPIO
Put number 2 in the config file , after power on the Module , it will work in Mode 2.
In this Mode ,The Module with Serial port same as Mode 1 , and with 8 extended GPIO
Mode 3 : IR remote control
This mode not available for this moment
Mode 4 : 433MHz Radio control
Put number 4 in the config file , after power on the Module , it will work in Mode 4.
Operate the module by RF remote
Mode 5 : Timing Playback
Can set the time and make the module auto-play by 8 pins setting in J2 Connector
Mode 6: Select Play
There are 8 pins for key connection and each key play one file.
Mode 7 : Coding playback
Select the file by 8 pins (in J2 connector) coding , and STB negative pluse trigger (about 10ms) to play the file,256 files can be triggered by 8 pins coding
TDR025 Playback & Recording Module
5
Mode 8: Auto-Play & Auto -Record
After power on, the module will detect the J5 pins , if not connected , will start to play , if connected , will start to recod . During recording ,if disconnect J5 , and will stop recording and start to play .
Mode 9 : Button Record/Play
With Record/Play switch , next ,previous , Play/Pause function by
conecting buttons. 3.Structure and Pins description
3.1.Pins description
J2 Connector Pins
TDR025 Playback & Recording Module
6
NO. Pin Name Type Function
1 STB I Trigger ,Low active
2 P20 I Key input 1, extended GPIO 0
3 P21 I Key input 2, extended GPIO 1
4 P22 I Key input 3, extended GPIO 2
5 P23 I Key input 4, extended GPIO 3
6 P24 I Key input 5, extended GPIO 4
7 P25 I Key input 6, extended GPIO 5
8 P26 I Key input 7, extended GPIO 6
9 P27 I Key input 8, extended GPIO 7
10 MCU_TXD O Serial port,TTL signal transmit
11 BUSY O Busy pin , low level during playing
can pull up to 5V
12 MCU_RXD I Serial port,TTL signal receive
13 VCC_5V P/I DC 5V power,connected to J7
positive
14 MCU_SCL O I2C communication ,Clock pin
Recording signal switch pin
15 VCC P/O DC 2.5V output from stabilizers
16 MCU_RST I Hardware reset,low active, 10ms
17 NC Not connected
18,19,20 GND P Digital Ground
TDR025 Playback & Recording Module
7
J8 Connector Pins
No. Pin Name Type Function
1 LEFT A/O Audio output L
2 RIGHT A/O Audio output R
3 GBUF A/O Public Audio signal
4 AGND A/P Audio Ground
O : Output pin , 2.5V (if without exteral pull up ),can pull up to 5V
with resistor
I : Input pin , maximum input voltage is 5V
P : Power pin
A : Audio pin
3.2.LED functions on the Module
D4 : Power indicator
D1 : Memory card status indicator .After power on , this lED turn on
means Memory card ready, if off , means can not read the memory
card ,please check out the memory card quality and system
(Should be FAT16) and the config file . When playing or recording ,
it will be flashing.
D2: MCU working staus indicator ,when there is trigger from
TDR025 Playback & Recording Module
8
outside , it will flash . This indicator work different for different
Operating Mode.
D3 : BUSY indicator, when the BUSY pin is low , the LED is on ,
means system working,can not receive new command, When
BUSY pin is High , and system free and LED off.
Module will initialize after power on ,if failure , D3 will flash 10
time then reset . If Memory card Initialization failure , D2 will flash
10 times and then reset , If file system wrong (correct should be
FAT16), D1 willl flash . If config file error , D1 and D2 flash at the
same time .
3.3.Files Saving in Memory Card The Memory should format to FAT before loading files , and the Memory card should not bigger than 2GB
And there should be two folders in the Memory card , Music
folder and Config folder . And in the Config folder ,should
new a txt file and name it to config.txt and input the Mode
number ( from 1 to 8 for selecting different working mode .)
TDR025 Playback & Recording Module
9
When the module working in Mode 6 and 7 , the files name in
the Music folder should be 000.mp3 ,001.mp3 ,.256.mp3
Config file in the Memory card
There should be two folder in the SD card
In the config folder , new a txt file and rename it to config.txt
Input number (from 1 to 9)to the txt file select working Mode
4.Working Modes description
TDR025 Playback & Recording Module
10
4.1. Mode 1 : Serial Port with Key interface
Put 1 in the config.txt file and save ,after module power on , it will
working in Mode 1 . And the module can be controlled by MCU or
Key pins on J2 .
4.1.1.Key function in Mode 1
During playing , when the STB pin pulled low,will stop to play ,
when it high again it will turn to play next song or wait the serial
command .
During playing , D1 LED flashing means reading the Memory card
the MP3 chip decoding and playing . When P27 pulled low by
negative pulse will pause to play ,next negative pluse will make it
keep playing again . During pause , D2 LED is on , during playing
D2 LED is off .
During playing , P20 and P21 for volume up and volume down,
when the volume reah peak , D2 LED will turn on , release and turn
off
4.1.2. Serial port function in Mode 1
The Serial port are TTL Level, TXD and RXD can connect to
MCU , if connect to PC RS232 , need a convert circuit between
TTL and RS232 .
Baud rate 9600bps, 1 start bit , 8 data bit , 1 stop bit ,no Parity
TDR025 Playback & Recording Module
11
Serial command start with 0x1B,0x10 , and feedback start by
0x4F,0x4 (Command carry out success ) or 0x45,0x52 (Command
carry out failure)
Command consist by 1B+10+XX (Command type) +N (data
length)+N Byte (include end code 88)
Commands List :
Command :0
Online command : 1B 10 00 01 88
Success feedback : 4F 4B 00 01 88
Others feedback or no feedback means communication fail
Command :A0 (Enter into folder)
Example Command : 1B 10 A0 09 "12345678" 88
Means enter into the folder which name is 12345678 in the
directory in memory card
Feedback : 4F 4B 00 01 88 // Success enter into the folder
Feedback :45 52 A0 01 88 // Enter into folder fail
For example : 1B 10 A0 06 4D 75 73 69 63 88 , means enter
into foler Music folder in the directory ,the red letter is the folder
ASCII value.
Feedback 4F 4B 00 01 88 // Success enter into the folder
TDR025 Playback & Recording Module
12
Feedback 45 52 A0 01 88 // Enter into folder fail
Command 80 (Play specified file in current folder)
Command Example : 1B 10 80 13 "12345678.MP3" 88
Means play the 12345678.mp3 file in the current folder.
Command Example : 1B 10 80 08 30 30 31 2E 6D 70 33 88
Means play the 001.mp3 file in current folder.
Feedback : 4F 4B 00 01 88 Means find out the file and start to
play . During playing , Module will pull low BUSY , D3 LED will be
on , and D1 LED will flash .Finish playing , BUSY will be High , D3
LED turn off , and D1 LED will be on , means can accept new
command.
Command : 81
Pause Command: 1B 10 81 01 88
Feedback : 4F 4B 00 01 88 // during the pause , D2 LED will be on
Command :82
Get back to play : 1B 10 82 01 88
Feedback : 4F 4B 00 01 88
Command :83
Stop current playing : 1B 10 83 01 88
TDR025 Playback & Recording Module
13
Feedback : 4F 4B 00 01 88
Command : A4
Volume control and checking(0xA4)
Command1B 10 A4 02 XX 88 // XX is value from 0 to 250 , 0
is must, 250 is maximum.
Feedback: 4F 4B 56 01 88 // Set the volume success and
feedback the volume value is 0x56Higher value ,lower volume
Command : 1B 10 A4 02 FF 88 // Check the current volume
Feedbak: 4F 4B 06 01 88 // volume is (06)
Command : 90
Check the playing status (0x90)
Command1B 10 90 01 88
Feedback: 4F 4B XX 09 0002 0001 0000DC58 88
When XX is 80 means playing , 81 means Pause,00 means
play finish.
When loop playing file in folder , 0002 means totol file is 2 ,
TDR025 Playback & Recording Module
14
0001 means file number 1 is playing . 0000DC58 means
sectors spare for this file.
Command :C1
Loop play all files in Folder 0XC1as background music
Command 1B 10 C1 04 XXXX 88 , X is the folder
name ,length from 1 to 8
Example : 1B 10 C1 06 4D 75 73 69 63 88
Loop play all files In folder Music
Feedback: 4F 4B 00 01 88 // Success
Feedback : 45 52 C1 01 88 // Fail
Command :C8
End this folder loop playing0XC8 For change other one .
Command :1B 10 C8 01 88
Feedback :4F 4B 00 01 88 //End this folder playing sucess
Command : F0
Get the playing file information. (0xF0)
Command : 1B 10 F0 01 88
Feedback4F 4B F0 10 ABCDEFGHMP3 000089DE 88
TDR025 Playback & Recording Module
15
0x10 means 16 additional data , ABCDEFGHMP3 means
the playing file is ABCDEFGH.MP3 , 000089DE means the
file data total sector 0x000089DE .
Command : E8
Write data to EEPROM on the module 0XE8
Command : 1B 10 E8 03 AA DD 88 , AA means
address ,can use 00 to FF , DD means the data which write
into the address.
Feedback: 4F 4B 00 01 88 // Module did not verify the
wrote data , After write the data in ,can use read command to
verify the data write in success or fail .
Command : E9
Read data from EEPROM 0XE9
Command : 1B 10 E9 02 AA 88 // AA means address , can use
00 to FF
Feedback : 4F 4B DD 01 88 // DD means the data save in AA
address .
Command : E0
TDR025 Playback & Recording Module
16
Open a folder(0xE0)
Command 1B 10 E0 06 HZK16 88
Means open the file which name is HZK16 in current
directory. Only after open the file ,then can read the file content
and opeate it
Feedbak4F 4B 00 01 88 // Means find out the file in
current directory, and open sucess
Feedback45 52 E0 01 88 ,Means can not find out the
file
Command : E1
Read file content in sector (0xE1)
Command : 1B 10 E1 09 12345678 0040 0020 88
Means reading start sector 0x12345678 in the open file ,
Within the sector the offset address is 0x0040(64), Continuous
Read 0x0020(32) bytes
Feedback 4F 4B E1 21 +32 Data read from Memory
card+88 , and 0x21 means the Additional data length is 33
Note : In the Command of sending data ,if the data length
over 255 , the additional data length in feedback can not show
TDR025 Playback & Recording Module
17
the high bit correctly , only show low bit
The reading data length maximum is 0x0200(512 bytes), if
over this, data will invalid
Start address can be from 0x0000 to 0x01FF , but Start
address + Data length can not over 0x0200 , or else , the read
content over one sector capacity , the data will be invalid.
Command : F9
Send data to extended serial port(0xF9)
Command: 1B 10 F9 0X AABBCC,FF 88
Extended serial port use fixed baud rate 9600bps to send the
data , serial port data communcation format , 1 start bit , 8 data
bit , No parity , 1 stop bit .
0X means the additional data length is the data(sent to serial port )
+1 , maximum value is 13
AA,BB,CC is the data content sent to the Module , can send 12
valid data at one time , over 12 data , will not valid and feedback
error .
Command :F5
Read the Memory card sector data (0xF5)
TDR025 Playback & Recording Module
18
Command :1B 10 F5 05 AABBCCDD 88
AABBCCDD is the 4 byte memory card sector number, for
example , MBR normally in 00000000
Feedback:4F 4B F5 EB 3C 905A A5 88,total 512+5=517Byte
And EB 3C 905A A5 are the content read from Memory card
sector .
Feedback :45 52 XX 01 88 // Means Read Memory card fail.
And XX is the error mark when reading memory card error.
Command : C2
Execute reset the module (0xC2)
Command 1B 10 C2 01 88
After send the command , module will reset , same function
with the reset circuit on the module .
Command : 88
Start up the record operation0x88
Command : 1B 10 88 09 30 31 36 38 2E 77 61 76 88
09 Means the command additional data length is 9 , and
30313638 2E 776176 means the recorded file name is
0168.wav , the recorded file will save in current folder , you
can enter the folder before start to record
TDR025 Playback & Recording Module
19
When the module receive the command will start to record ,
during recording , write each sector ,host will send a byte F
to show it is in recording.
If the first byte is * when send the record command , the
recorded file name will be RECXXXXX.wav , the XXXXX is
the numbers of file . module will auto search the existing
biggest file number, and the biggest number +1 will be the
new recorded file name .
Auto create file name record example : 1B 10 88 04 2A 2E 2A
88 ,because the specified file name is *.* , so it will create
the file name automatically .
Command :8B
Stop Recording0x8B
Command:1B 10 8B 01 88
During the reocrding ,module receive this command, it will
stop recording and create the specified file name .
Note: Memory card should be FAT16 format ,please format the
memory card before recording ,avoid stop recording by Disk
fragmentation .
TDR025 Playback & Recording Module
20
Mode 2 (Seril Port +GPIO )
Input number 2 in the config file ,after power on the module ,it will
works in Mode 2 (Seril Port +GPIO ),In this module 2 Serial port
include all Mode 1 Serial port function, and have to extra two
commands . but without key function , have 8 extended GPIO
from P20 to P27 .They are in weak pull up status .
Command :FA
4.2.1 Write extended GPIO 0XFA
Command 1B 10 FA 02 XX 88
XX is the value to 8 GPIO ,D0 corresponing P20 pin , D7
corresponding P27 pin
Feedback4F 4B 00 01 88 // Means sucess
Feedback 45 52 FA 01 88 // Means the module not support this
command , please check the module working in the Mode 2 or
not .
Command : FB
Read extended GPIO(0xFB)
Command1B 10 FB 01 88
Feedback4F 4B XX 01 88
XX represent the P20 to P27 pins status , D7 represent P27 .
TDR025 Playback & Recording Module
21
In Mode 2 , the GPIO default in weak pull up status.
In Mode ,the STB can stop the playing .
4.3. Mode 3 ( IR Remote )
Coming soon
4.4. Mode 4 (RF remote)
Coming soon
4.5. Mode 5 Timing Playback
Put number 5 to the config txt file , the module will work in Mode
5 , start to play at setted time , and will play the mp3 files in
music folder looply .
The P20 to P27 for setting the time , P20 to P23 for minute, P24 to
P27 for hour.
Time = 5 minutes * (P23-P20) + 1 hour*(P27-P24)
The minimum time is 0 minute , and maximum is 16 hours 15
minutes
For example , P20 to P27 value is 1001 1000 ,means the time is 1
hour and 45 minutes
If you want set after 8 hours and start to play , set P20 to P27 as
0000 0001
TDR025 Playback & Recording Module
22
When the module works in Mode 5 , after power on the module will
detect the P20 to P27 value , when the time is arrival, it will start to
play files in music folder
During timing , D1 and D2 LED will turn off , the decoder chip and
the Memory card will in reset state to save power . D3 will flash one
time every seconds to show the system still working .If need more
lower consumption , can remove the D4 power LED , because it
always on once power the module.
4.6. Mode 6 Direct Play
Put number 6 to the config file ,power on the module It will works
in Mode 6, can play 8 files maximum
After power on , if everything is ok , D1 LED will be ON, D2 and
D3 LED will be OFF. P20 to P27 can trigger 8 different
file(001*.mp3 to 008*.mp3) in music folder ,one pin play one file ,
Low active .The priority from P20 > P21 >,> P27 . During playing,
D3 LED (BUSY signal) is Low level,after playing finish, D3 will turn
off .
After trigger , D2 LED flash , D3 LED OFF ,means fail to find out the
file , pls checck the file exsit or not ,file name is valid or not. During
playing , Give negative pulse to STB ,will stop the playing .
TDR025 Playback & Recording Module
23
After playing finish, any pin of P20 to P27 is low , it will continue to
play the corresponding file. The file name should start with
numbers 002-Love.mp3 , when detect P21 is low , it will play this
file .
When using MCU or PLC to control the module playing , the
negative pulse should not less than 10ms
4.7.Mode 7
Put number 7 to the config file ,power on the module It will works
in Mode 7, can play 256 files maximum .
After power on , if everything is ok ,LED D1 will be ON , D2 and
D3 OFF . When put low STB , Module will read the level value from
P20 to P27 first , then convert the Binary value to decimal
value ,and start to find the corresponding file (000*.mp3
256*.mp3 )in the music folder . During this ,D2 flash one time
means response for the trigger ,when the STB become Hihg ,It will
start to play the coresponding file. During playing D3 (BUSY) will
be ON (low level output ) , after play filish, D3 will turn off .
After trigger ( STB from low to high ) , if LED D2 flashing , D3
always OFF , means fail to find out the coresponding file to play .
Please check the file name valid or not .
During playing , trigger STB again , will stop the playing ,and
TDR025 Playback & Recording Module
24
turn off D3.
The Pins P20 to P27 connected pull up resistor ,when the pin
N/C , it is 0 . When connect to GND, it is 1 . P20 is lowest bit,
P27 is highest bit .
The mp3 files name in the music folder ,should start with
numbers , for example , 001mylove.mp3 , when STB trigger and
read the P20 to P27 value is 006 ( Binary converted to decimal) , it
will start to play this file .
When using MCU or PLC control the module , the trigger time must
more than 10ms , if shorter than 10ms will not response.
4.8. Mode 8 Auto-Record & Play
When put number 8 in the config file ,after power on the
module , it will works at Mode 8. When power on the module ,If the
J5 pins in connected,it will auto start the recording , the D1 and D2
LED will flash ,means the system during reccording , and connect
headphone can hear the recording conntent at the same time.
During recording , disconnect the J5 pins , it will stop reocrding
and start to play the recorded file , the recorded file name number
will increase by degree every time.
When power on the module , J5 pins are disconnected , the system
TDR025 Playback & Recording Module
25
will play all the file from begin to end , and loop.
During playing , if pull Low STB pin , will stop to play current
file ,when STB become high ,start to play next file .
During playing , D3 (BUSY LED) will be ON ,D1 LED will flash,if
give P27 a negative pulse , it will pause ,and D2 LED will be ON,
D1 LED will be OFF ,means the system pause and stop to
reading the memeory card, next negative pulse to P27 will continue
to play . D2 LED will be OFF .
During playing , P20 and P21 for volume up and volume down . If
keep P20 low level , the volume will keep increase, when the
valume is maximum , D2 LED will be ON . If keep P21 low level ,
the volume will decrease , when the valume is minimum , D2 LED
will be ON , after release the P21 , the D2 LED will be OFF .
Volume control also valid during Pause ,Because now D2 LED ON
show the system in Pause , so D1 LED will show the minimum or
maximum volume . D1 LED ON means it is minimum or maximum ,
D1 LED OFF means the volume still can be adjusted.
In the Mode 8, the Serial Port function will valid .
TDR025 Playback & Recording Module
26
4.9. Mode 9 ,Button record/Play (Low Active)
Input number 9 to the config.txt file ,the module will works in mode
9 after power on . D1 and D3 LED will turn on ,waiting for reocrd
or play operation , D3 LED Is the record/play status indicator,when
it is ON, means module in Play status (when power on ,it is play
status) , when it is OFF ,it is record status.
In the J2 interface , the pin P20 and P21 for Previous and Next
song when triggering to GND. Pin P26 for Switch Record or Play
status triggering to GND , When Module is Play status, LED D2 is
OFF, D3 is ON , When Module is Record status ,LED D2 is ON , D3
is OFF. When the module is playing or recording , trigger Pin P26
will stop playing or Recording. Pin P27 , When the Module in
Record status , Trigger P27 for starting record, When the module in
Play status , trigger P27 for play or pause.
5. Audio Output
5.1. Module can direct drive 16 to 32 ohms stereo headphone.
5.2. External Amplifier
5.2.1. Connection 1 ( suggested)
TDR025 Playback & Recording Module
27
5.2.2. Connection 2 ( See Note before using this connection)
Note : If the Mp3 module and amplifer use the same
power , can not use connection 2 .
TDR025 Playback & Recording Module
28
Contact us
Tenda Electronics Limited Guangzhou , China Contact person : Mr Keith / Mike Tel: 86-20-22100510 Fax:86-20-37921106 Email:[email protected] , [email protected] Web:www.tendaelectronics.com