Solved

PIC16F / PIC18F, simple mono Music project

Posted on 2004-09-25
6
3,832 Views
Last Modified: 2013-12-10
This project relates to PIC18F series using IAR PIC18EW complier (HICC or CC2 or similar example accepted).

I am seeking article from mazagine, experience by someone, links that demostrate how to

(a) Coverts mp3 or common format containing simple sound or music including spoken word into compressed format file. Perfer to limits bandwidth sufficient for small PCB speaker or at least peizo.
(b) Transulates the compressed format file into 8, 10 or 12 bits data output via SPI where external DAC is driven.
(c) Descrition on how this is done if possible with code examples.
(d) If possible but not required, cheap audio amp circuit between DAC and small speaker about 5-10mm dia.

Tested example from other controller will be considered, I can transfer and modify the C or C++ program into microchip PIC18F series. I quite good in Basic, C, C++ and C# from compact framework.

Anyone offer an inputs?.

Thanks.
0
Comment
Question by:riscy
6 Comments
 
LVL 1

Expert Comment

by:Mazen
ID: 12154051
Hi riscy,

   The project you are heading to is not and easy project but it is challenging. I've worked before in such fields and it's very interessting yet I faced a lot of problems but I managed to solve them.
But first let me get what you said straight, you need to convert mp3 file format into compressed file format? MP3 is already a compressed audio file, I don't think you can do more compression than this. I think what you mean probably is convert wav files into compressed file format (inother words into mp3 format).
As a starter check out the followig link:
http://datacompression.info/MP3.shtml
It has source codes written in C for mp3 (which is MPEG audio) compression and decompression.
How are you planning to read the uncompressed files, will it be through a serial connection to a PC? Or you'll do your own files by implementing a small recorder?
 I think it's better if you can get parallel DAC since it is faster than the ones you communicate with through SPI.
You can decrease the resolution of the mp3 file from 12 -> 10 bits, 12 -> 8 bits, or 10 -> 8 bits by removing the least significant bits from all the bytes (encoded samples) in the uncompressed file. For example to change the resolution from 12 -> 10 , remove least significant 2 bits from all the bytes in the files.
But You can't do the reverse process, you can't increase the resolution.

  Hope this helps,
      Mazen
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 250 total points
ID: 12160158
I have bookmarked this interesting page about sound with PICs:
http://www.romanblack.com/picsound.htm
0
 

Author Comment

by:riscy
ID: 12160333
Sorry for not being clear:-

I mean change the format from mp3 into different format at the PC end, where the converted data is later transferred into PIC memory

The data with standard format optimised for limited demands from processing from simple microcontroller such as PIC18F series. But not too primitive as to play simple tune for young tukes. I'm not really seeking best quality but to play music or voice without getting too demanding. Bandwidth upto 2Khz or 4Khz might be okay. For example Jazz music.

Riscy
0
 

Author Comment

by:riscy
ID: 12442006
I unable to find relevent answer to this question
0
 
LVL 32

Expert Comment

by:LucF
ID: 12447538
riscy,

Although I wasn't a participant in this question, giving a "C" grade is considered pretty rude around Experts Exchange. Please ask the Moderators to delete your question next time if nothing helped (see the link I gave in the above question) to keep the database clean.

Thanks,

LucF
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article applies to This article will be of use if you are the owner / supporter of any computer that comes with a discrete graphics card from nVidia / ATI Radeon (Now owned by AMD) or any embedded graphics solution and need to upgrade the gr…
A little history Back in 1997 when I built my first custom computer using the revolutionary Gateway website I didn’t have much to choose from except for the CPU. The race between computer manufacturers was held back by processor manufacturers. They…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question