Solved

PIC16F / PIC18F, simple mono Music project

Posted on 2004-09-25
6
3,830 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:Luc Franken
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RAID 5 on Intel Rapid Storage RAID missing a drive 4 126
Laptop battery gauge icons 8 89
Video card for a Dell Optiplex 990 4 63
Cooling a 'server' cabinet 7 43
Memory (not to be confused with Hard Drive Space) can greatly increase the performance of a computer. Each version of Window has greater demands on memory. My personal recommendation to get decent performance out of a machine is as follows: Windows…
As you can read I recycle all my old hardware and the time has come that my power supply of 200 Watt cannot provide enough power for my backup server. I have lots of Compaq power supply's laying around, so I figured to use one of these PSU's. I t…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

22 Experts available now in Live!

Get 1:1 Help Now