E-blocks MP3 Player

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

E-blocks MP3 Player

Post by mimiyum »

Hello,
I am thinking of building an E-blocks MP3 player. Is this possible if I were to use the following:
1. EB-061 with ECIO-40
2. EB-021 MIDI Board to output to earphones or speakers
3. EB-037 SD/MMC Card Reader to store the music
4. EB-005 LCD Board to show status (playing, pause, stop) and music (title or song number)
5. EB-014 Keypad to enter song number

Before I order the above items, I have the following questions:
1. Is my idea possible? :oops:
2. Can I directly use some of the outputs on the ECIO-40 to CONTROL ("play," "stop," "pause," or "reset") the chosen song? or Do I need the EB-007 Switch Board to do this?
3. Are there enough ports to do this? Does the LCD Board use 2 ports?
4. If the ECIO-40 is mounted on the EB-061 Baseboard, does this mean that we can no longer connect directly to the ECIO-40? Does this mean we have to connect only through the connectors of each port?
5. Can we do all this programming in flowcode or do we need to have knowledge of C programming to do this project? Coz that's when I'm really going to get stuck!

Sorry for the many questions, I would like to order the correct items all at once rather than find out I need something else and wait until the next batch of items arrive.
Thanks!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-blocks MP3 Player

Post by Benj »

Hello Mimiyum,

In answer to your questions.

1) Using the FAT component in Flowcode I have been able to stream WAV files that are 100hz and mono. I think this is reaching the maximum throughput for the PIC. the ARM ECIO device does better but your still talking WAV files and not MP3. I think to do MP3 reliably you need to be looking at a specific MP3 chip combined with a micro for control. The reason for this is MP3 is compressed whereas WAV files contain raw data.

Theres quite a nice reference project available from here.
http://www.ladyada.net/make/minty/fabrication.html

Also MIDI does not output audio in a way you can hear, instead it is more like a event based system where it tells you when a note or a beat happens but you have to assign the audio sample accociated to that beat or note using a computer or sampler. You would be better off using a PWM channel to output the audio data. See my article on playing WAV files and this should become clearer. I have even included a circuit for a basic amplifier, though the PWM by itself will happily drive some headphones or an amplified input jack such as on a car stereo.

http://www.matrixmultimedia.com/mmforum ... =26&t=4850

2) Depends what you are using. If you want to play WAV files directly like I did then yes you can do this no problem. Otherwise you will probably have to send a command over I2C or SPI etc to tell the MP3 decoder chip what to do. This is probably just as easy and will be possible to trigger from a button press.

3) Yes there is enough ports to do this.

4) Should all be possible in Flowcode though if you go down the MP3 chip route then you may need to get to grips with talking to the MP3 device. This will probably involve the use of I2C or SPI but these are both relativly simple to get up and running.

Let me know how your getting on and what you decide to do. I recommend you do a bit more research before you buy anything. If you need more advice etc then let me know.

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: E-blocks MP3 Player

Post by mimiyum »

Hi Benj,

Thanks for the clarification. I realize that I do not need to play MP3. WAV files would be fine. It is really your article that I should work with and take it a step further by incorporating the command inputs through the keypad and maybe some switches as an added feature.

This means that the hardware I need are the
1. EB-061 with ECIO-40
2. EB-037 SM/MMC Card Reader
3. EB-005 LCD Bard
4. EB-014 Keypad

Is the above correct?

And if I want to use switches, i guess I can add the EB-007 Switch board right?

We're getting close...

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-blocks MP3 Player

Post by Benj »

Hello Mimiyum,

You could probably get away with not using the keypad and instead using a switch E-block but this is up to you. They will both allow you to send digital inputs to the system to control the operation.

Using the WAV article it should be possible to assign the buttons to do everything a standard MP3 player can do and it may also be possible to start doing searches of the files using the FAT component. Eg if name begins with an s and the extension is .WAV. I used Winamp to convert my MP3 files into compatible WAV files, just a case of configuring the output disk writer plugin in the plugin properties and then playing your files.

It may also be worth getting a EB002 screw terminal board to allow you to connect the headphone socket to the board. Otherwise you could get a 9-way d-type connector and solder the socket directly to this.

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: E-blocks MP3 Player

Post by mimiyum »

Hello Benj,

Eager to start while waiting for the MMC/SD Card Reader, I tried to work with what I had--the LCD Board and Keypad with the PIC16f877A on the EB-006.

When I tried the air to fuel ratio example on flowbook, I couldn't get a display out. When connecting the LCD board power to +14v of the EB-006, I am able to get the LCD working. I read somewhere that this would damage the LCD Board. Why is it working differently in my case? I put all LVP jumpers on the I/O port. Is this correct?

Thanks in advance for your help :P

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-blocks MP3 Player

Post by Benj »

Hello Mimiyum,

It depends which LCD you are using. The colour graphical LCDs require a large input voltage around 12-14V to drive the backlight. The standard alphanumeric LCDs we sell must be powered using 5V or 3.3V depending on the system you are using.

If in doubt then refer to the E-Blocks datasheet for help and guidance.

mimiyum
Posts: 94
Joined: Wed Jul 16, 2008 4:39 pm
Location: Philippines
Been thanked: 1 time
Contact:

Re: E-blocks MP3 Player

Post by mimiyum »

Hello Benj,

I am using your EB-005 LCD Board. I just want to be sure I don't damage the LCD Board. However it is working when the jumper is connected to the +14v of the EB-006 programmer board. It doesn't have any display when connected to the +V of the EB-006 Board. The EB-006 Board is uses external power supply with the adapter purchased from Matrix Multimedia.

Mimiyum

Post Reply