Home

User Manual Version 1.2

image

Contents

1. wwe Wwe Wwe Wwe ri OOAN AW PWN ul Wwe Wwe leo b o D S ve void set_port pinMode P OUTPUT pinMode P1 OUTPUT pinMode P2 OUTPUT pinMode P3 OUTPUT pinMode P4 OUTPUT pinMode P5 OUTPUT pinMode P6 OUTPUT pinMode P7 OUTPUT pinMode PL OUTPUT pinMode BUSY INPUT 1 Pin assignments 2 Pins direction assignments void send_CMD unsigned char cmd if cmd amp x 1 digitalWrite P HIGH Bit else digitalWrite P0 LOW if cmd80x02 digitalWrite P1 HIGH Bit 1 else digitalwWrite P1 LOW if cmd80x04 digitalWrite P2 HIGH Bit 2 else digitalwrite P2 LOW if cmd80x08 digitalWrite P3 HIGH Bit 3 else digitalWrite P3 LOW if cmd amp x1 digitalWrite P4 HIGH Bit 4 else digitalWrite P4 LOW if cmd amp x2 digitalWrite P5 HIGH Bit 5 else digitalWrite P5 LOW if cmd amp x4 digitalWrite P6 HIGH Bit 6 else digitalWrite P6 LOW if cmd amp x8 digitalWrite P7 HIGH Bit 7 else digitalwWrite P7 LOW delay 100 digitalWrite PL LOW delay 100 digitalWrite PL HIGH y boolean cmd_stop false void setup set _port void loop if digitalRead BUSY HIGH amp amp cmd_stop false Venus Supply Co Ltd send_CMD xF3 delay 200 4 Call set_port to set pins direction while digitalRead BUSY HIGH send_CMD 0x02 cmd_stop true hai
2. BUSY HIGH amp amp cmd_stop false Serial write 0x01 cmd_stop true Code description include lt SoftwareSerial h gt SoftwareSerial mySerial 3 4 RX TX A software serial port named mySerial is established by using D3 as RX and D4 as TX void setup pinMode BUSY INPUT mySerial begin 9600 BUSY D5 is configured to be an input port Then the serial port is initialized void loop if digitalRead BUSY HIGH amp amp cmd_stop false mySerial write 0x01 cmd_stop true T When logic on BUSY pin becomes High and cmd_stop is false a command 0x01 will be sent via serial port Then cmd_stop is set to true This will command the module to play the first file once Venus Supply Co Ltd Dr Page 15 haieasyelec enable your design Example 2 In serial mode send a command to play 002 mp3 in folder 03 Hinclude lt SoftwareSerial h gt SoftwareSerial mySerial 3 4 RX TX const int BUSY 5 boolean cmd_stop false void setup 1 pinMode BUSY INPUT mySerial begin 9600 T void loop 1 if digitalRead BUSY HIGH amp amp cmd_stop false mySerial write 0xF3 delay 200 while digitalRead BUSY HIGH mySerial write 0x02 cmd_stop true Code description void loop 1 if digitalRead BUSY HIGH amp amp cmd_stop false mySerial write 0xF3 delay 200 while digitalRead BUSY HIG
3. below zero ohm resistors are used here By default the module is configured in parallel mode L us Z T e L e oe gt oe a n gt c gt gt o s ENTE f MP3 EMBEDDED MODULE R155 MO id mz LEDIG R157 So AA e LED_3U3 E S ocw cew CE TL E mi ries O Imm TTT L 6 piac MP3 EMBEDDED MODULE Idec By A ARA AA Venus Supply Co Ltd lt Page 6 haieasyelec enable your design 3 Control the module in Parallel mode The module is controlled by Arduino UNO R3 EADNO14 for example In parallel mode 10 signals are used for control 8 bit data PL and BUSY Optionally VOL and VOL can be connected to switches for increasing or decreasing the volume directly Data In 8 Bits in whl Arduino UNO T MIEDO M L ae mng P Switch Vol D Switch Vol Left Signal ES Audio Signal L Audio Jack 3 5 mm HB L HP_R R The connections are described below MP3 module Pin Device 5V 5V Arduino GND GND Arduino Audio Jack Audio Jack Venus Supply Co Ltd Dr Page 7 haieasyelec enable your design From the circuit above control signals are PO P7 PL and BUSY Whenever that BUSY is High the module is ready to accept new parallel command The user can send a command to PO P7 then send a Low strobe pulse on PL Commands are listed below rs i 001 pay the first fle t
4. BUSY is High set data pins to 0x01 to the module and send Low Page 9 Code description void set_port pinMode P OUTPUT pinMode P1 OUTPUT pinMode P2 OUTPUT pinMode P3 OUTPUT pinMode P4 OUTPUT pinMode P5 OUTPUT pinMode P6 OUTPUT pinMode P7 OUTPUT pinMode PL OUTPUT pinMode BUSY INPUT Function set_port is used to initialized pins to be output or input void setup set_port Function setup is used for initialization void loop if digitalRead BUSY HIGH amp amp cmd_stop false digitalWrite P HIGH digitalwWrite P1 LOW digitalwWrite P2 LOW digitalwWrite P3 LOW digitalwWrite P4 LOW digitalwWrite P5 LOW digitalwWrite P6 LOW digitalwWrite P7 LOW delay 1 0 digitalWrite PL LOW delay 1 0 digitalWrite PL HIGH cmd_ stop true When logic on BUSY pin becomes High and cmd_ stop is false a command 0x01 will be sent by setting 8 bit data to 00000001 then send a Low strobe pulse on PL Then cmd_stop is set to true This will command the module to play the first file once Venus Supply Co Ltd Pr Page 10 haieasyelec enable your design Example 2 In parallel mode send a command to play 002 mp3 in folder 03 const const const const const const const const const const int int int int int int int int int int PO P1 P2 P3 P4 P5 P6 P7 BUSY PL
5. H mySerial write 0x02 cmd_stop true In loop when D5 BUSY becomes High and cmd_stop is false a command OxF3 will be sent via serial port This will change directory to 03 Then wait until BUSY becomes High again and a command 0x02 is sent to play 002 mp3 Venus Supply Co Ltd Sn Page 16 haieasyelec enable your design
6. OxF3 will be sent to change directory to 03 Then wait until BUSY becomes High again and a command Ox02 is sent to play 002 mp3 Venus Supply Co Ltd lt Page 12 haieasyelec enable your design 4 Control the module in Serial mode Circuit below shows how to connect the module to Arduino UNO R3 EADNO14 using 3 signals TX RX and BUSY x Arduino UNO t AVW D5 BUSY ware pm Devies ac ES o fi o tema Venus Supply Co Ltd l Dr haieasyelec enable your design CND o l T Left Signal A C Right Audio Signal ona Audio Jack 3 5 mm GND Page 13 In this example a software serial is used by setting D3 to be RX and D4 to be TX The communication is configured to Baud rate 9600 Data Bit 8 Stop Bit 1 Parity None Commands are exactly the same as used in parallel mode HEX DEC 0x01 001 Play the first file 0x02 002 Play the second file Play the 199 file Pause playback Stop playback Change directory to 01 Root directory Change directory to 02 EC o Resume playback Change directory to 15 Venus Supply Co Ltd Sn Page 14 haieasyelec enable your design Example 1 In serial mode send a command to play 001 mp3 Hinclude lt SoftwareSerial h gt SoftwareSerial mySerial 3 4 RX TX const int BUSY 5 boolean cmd_stop false void setup pinMode BUSY INPUT mySerial begin 9600 T void loop 1 if digitalRead
7. User Manual ThaiEasyElec MP3 Embedded Module Version 1 2 else elnlalol eM yolul ftdlelsiifein Le ER rae 234 x L int mE ll Nr H L o Er b y d r ja A 1 Of ZE RED ONG Olm B un El C Y ofm 33 f MIPS Embedea HATE haleasyelec enable your design Revision History Version Date Changes 1 2 4 June 2014 Wording Correction 16 November 2013 Image chaged Usage with Arduino added 3 October 2013 Original Version Venus Supply Co Ltd Da Page 1 haieasyelec enable your design User Manual of ThaiEasyElec s MP3 Embedded Module amp 1 EE043 NaiEasyEl c eintalbl Wem yoluly desiga Muat h rif 19 E E T is 4 E le 2 amp kd om 8 20 5 t K gi t ou PERET t x vit mi Z e 13159 Ae y ja T R 25 diuna S mnn E L N TF LTF Sy TET IIS a Y fee TA O ES T L a 11H MIPS Embed WOTE The MP3 Module ETEE043 was designed to be an easy to use cost effective MP3 playback module It uses BU94502AKS2 as the MP3 decoder which provides fine quality sound with 8 kHz 48 kHz sampling rate The user can use any MCU to control the module using parallel or serial interface With MP3 files stored on a SD card the user can select a sound folder select a file start playback and control play volume using simple serial or parallel commands The SD card can be as large as 32 GByte The module is well suited many applications such as queuing syst
8. be asserted when data on PO P7 is ready How to use the module 1 Prepare files on SD card Sound files and folders have to be named sequentially with right format so the module is able to get to the next file or folder The file names in each folder must be 001 mp3 002 mp3 199 mp3 So there can be 199 files in a folder And there can be 15 folders on a SD card with names 02 03 15 The root directory is considered as the folder 1 44 A A A 4 02 03 04 05 kk 4 44 4 08 09 10 11 12 13 A bh 2 MP3 MP3 MP3 14 15 001 mp3 002 mp3 003 mp3 004 mp3 MP3 MP3 MP3 MP3 MP3 MP3 005 mp3 006 mp3 007 mp3 008 mp 009 mp3 010 mp3 MP3 011 mp3 File orderine example MP3 MP3 MP 001 mp3 002 m03 017 mp3 104 mp3 From figure above there are 4 files and the file 017 mp3 is counted as the 3 file So the user has to play it using command 0x03 Venus Supply Co Ltd Sn Page 5 haieasyelec enable your design Folder ordering example A L L a MPa 2 02 10 11 15 001 mp 002 mp3 A 017 mp3 104 mp3 From figure above there are 5 folders including the root directory The folder 11 is counted as the A folder to get into it use command OxF4 Change to folder 4 As illustrated it s recommended to name all files and folders sequentially 2 Select the operating mode Serial Parallel 2 1 To use Parallel mode MO and M1 must be connected to GND as shown
9. easyelec enable your design 3 Set data pins according to sending command 5 When BUSY is High send OxF3 and 0x02 to the module To change directory to 03 and play file 002 mp3 Page 11 Code description void send_CMD unsigned char cmd if cmd amp x 1 digitalwWrite P HIGH Bit 0 else digitalWrite P0 LOW if cmd amp x 2 digitalWrite P1 HIGH Bit 1 else digitalWrite P1 LOW if cmd amp x 4 digitalWrite P2 HIGH Bit 2 else digitalWrite P2 LOW if cmd amp x 8 digitalWrite P3 HIGH Bit 3 else digitalWrite P3 LOW if cmd amp x1 digitalWrite P4 HIGH Bit 4 else digitalWrite P4 LOW if cmd amp x2 digitalWrite P5 HIGH Bit 5 else digitalWrite P5 LOW if cmd amp x40 digitalWrite P6 HIGH Bit 6 else digitalWrite P6 LOW if cmd amp x8 digitalWrite P7 HIGH Bit 7 else digitalWrite P7 LOW delay 100 digitalwWrite PL LOW delay 100 digitalWrite PL HIGH Function send_CMD unsigned char cmd wraps the code in the first example into a single function lt accepts a character named cmd checks cmd bit by bit and set 8 bit data pins according to cmd Then it sends a strobe pulse on PL void loop if digitalRead BUSY HIGH 88 cmd_stop false send CMD xF3 delay 200 while digitalRead BUSY HIGH 1 send CMD x 2 cmd_stop true When logic on BUSY pin becomes High and cmd_ stop is false a command
10. em voice mail box station announcement Venus Supply Co Ltd Sn Page 2 haieasyelec enable your design Features Support stereo MP3 files 2 interface modes serial and parallel Support FAT32 and FAT16 file system Accept micro SD Card with SDHC supported maximum 32 GB Sampling rates 8 kHz 48 kHz Accept 5 VDC power supply Use 20 pin 2 54mm pitch header for interface Dimension 35x51 mm amp ThaiEasyElec T 35 P MP3 EMBEDED MODULE Choompon Poocharcenmiboon 51mm Electrical Characteristic aam m e m o COT wem ma moa AR owe a o o y aban e os os noom o e ashes iana o8 ors vme Venus Supply Co Ltd Da Page 3 haieasyelec enable your design Board Description f 2 ey Imn 6 EDDED moons 3 4 TEEES EL T 5 8 t TERI i Lp No 1 5V power indicator NO 2 MP3 Decoder IC BU94502AKS2 No 3 Mode Setting Serial Parallel for soldering No 4 BUSY LED No 5 MCU Debug Port No 6 MCU STM8S103 No 7 Micro SD Card Socket No 8 Interface Header see detail below ane Pintime penan Venus Supply Co Ltd Sn Page 4 haieasyelec enable your design Note BUSY Pin BUSY is driven low on initialization state and when a file is being played In all other case the pin is driven high PL Pin PL is the trigger pin with low level active When asserted the module read data from PO P7 It must
11. he first file epe Play the second file Pause playback Resume playback a Stop playback 1 xF 241 Change directory to 01 Root directory 242 Change directory to 02 255 Change directory to 15 Venus Supply Co Ltd Sn Page 8 haieasyelec enable your design Example 1 In parallel mode send a command to play 001 mp3 const const const const const const const const const const int int int int int int int int int int PO P1 P2 P3 P4 P5 P6 P7 BUSY PL Wee wwe Wwe e Wwe we Wwe O ON A WU BW N v ve void set_port pinMode P pinMode P1 pinMode P2 pinMode P3 pinMode P4 pinMode P5 pinMode P6 pinMode P7 pinMode PL pinMode BUSY INPUT T boolean cmd_stop false void setup set _port T void loop 1 OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT OUTPUT 1 Pin assignments 2 Pins direction assignments 3 Call set_port to set pins direction if digitalRead BUSY HIGH 88 cmd_stop false digitalWrite P HIGH digitalwWrite P1 LOW digitalwWrite P2 LOW digitalwWrite P3 LOW digitalwWrite P4 LOW digitalwWrite P5 LOW digitalwWrite P6 LOW digitalwWrite P7 LOW delay 1 0 digitalWrite PL LOW delay 100 digitalWrite PL HIGH cmd stop true Venus Supply Co Ltd haieasyelec enable your design 4 When

Download Pdf Manuals

image

Related Search

Related Contents

diseño y construcción de un sistema electrónico basado en tarjetas    SERVICE MANUAL  Attenzione - Viessmann    Craftsman 5-Drawer Instruction Manual  Istruzioni brevi PTCarPhone Serie 5  Zappers: Technology‐assisted Tax Fraud INDEX  Eizo S2402WFS-GY  FW-329S - ダイニチ工業  

Copyright © All rights reserved.
Failed to retrieve file