Solved

PIC16F / PIC18F, simple mono Music project

Posted on 2004-09-25
6
3,829 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
Comment Utility
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
Comment Utility
I have bookmarked this interesting page about sound with PICs:
http://www.romanblack.com/picsound.htm
0
 

Author Comment

by:riscy
Comment Utility
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
Comment Utility
I unable to find relevent answer to this question
0
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

System overheating may become a serious problem if not taken care of at the proper time. I am writing this article because I faced a similar problem. Intro All electronic devices produce heat, but computers are a special case - the processors bo…
More and more people are using the enhanced small form-factor pluggable (SFP+) tranceivers, and speed is of utmost importance. Testing of speeds are critical to ensure that the devices will meet the speed requirements. There are some testing challen…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now