Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PIC16F / PIC18F, simple mono Music project

Posted on 2004-09-25
6
Medium Priority
?
3,848 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 500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

722 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