Solved

PIC16F / PIC18F, simple mono Music project

Posted on 2004-09-25
6
3,842 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello It is a very old trick to use a ram disk in order to boost PC performances, in the past, when in home environments the fastest common devices were floppy disks a part of the very small ram memory available was used to create a virtual hard …
Introduction: When a connection to the internet is established, there always exists a modem between the connected device and the ISP (Internet Service Provider). The Operating System (OS) on your PC controls the modem which communicates with the …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

617 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