delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
Message-ID: | <4FA6B91E.9030000@keensupport.net> |
Date: | Sun, 06 May 2012 10:47:10 -0700 |
From: | Joe Knapp <joeknapp AT keensupport DOT net> |
Organization: | Keen Support Services, LLC |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
MIME-Version: | 1.0 |
To: | geda-user AT delorie DOT com |
CC: | Rob Butts <r DOT butts2 AT gmail DOT com> |
Subject: | Re: [geda-user] 16 bit signed PCM .wav file into an EEPROM |
References: | <CALSZ9gpnW0ZYwNy2dX=XPeYmVffPYJrGyx-b=kqhnvLPtvDQ+w AT mail DOT gmail DOT com> |
In-Reply-To: | <CALSZ9gpnW0ZYwNy2dX=XPeYmVffPYJrGyx-b=kqhnvLPtvDQ+w@mail.gmail.com> |
Reply-To: | geda-user AT delorie DOT com |
Rob, A few suggestions / clues: 1. Since you are using a low computing power uC you will likely need to stay with the WAV file. (No need to decompress the data) I doubt that you need 16 bits. You can probably do just fine with 8 KS/s at 8 bits. Take a look at wikipedia's article on WAV format. They have several audio samples that you can listen to. The problem with MP3, in your case is the computing power needed to decompress the data. 2. Assuming that the EEPROM is not socketed, I would perhaps try creating a simple program that reads data from the PIC UART (I assume that the PIC has a UART) and then writes that data to the EEPROM. Maybe use HW handshake on the serial port if needed due to the slow EEPROM write time. So, using a terminal program on the PC you would send the file to the PIC that would burn the EEPROM. I could not readily find a EEPROM access library for the PIC 8, but I have no experience with PIC so I am not sure where to look. 3. With a PCM file you do not actually need an off-the-shelf DAC, all that you really need is a RC filter with the right 3dB bandwidth. Take a look at the following link. (They use an FPGA, as opposed to your PIC.) Good luck. On 05/06/2012 09:55 AM, Rob Butts wrote: > This is associated to the duck quack question I posted yesterday. > > I endedp up recording a duck quack sound using Audacity. I then > exported the quack to a (Microsoft) 16 bit signed PCM 89KB .wav file > and a 10KB .mp3 file and saved them to my computer. My current design > I am using a small Microchip 8 bit microcontroller with six IO pins > and I am sounding a magnetic buzzer with a square wave as an alert. > I'd like to change this where I store the .wav file (or one of the > other 11 exporting file types) in eeprom and output the file to a DAC > and to a speaker when I want the alert sound. > > My dilemma: > 1. What is the best/easiest file type to convert the quack to. > 2. How to get the .wav file (or other file type) from my hard drive > into the eeprom. > 3. What type of cheap DAC chip to use (not familiar with them at all). > > Any suggestions are welcome. > > Thanks! > > -- > Keen Support Services, LLC > http://keensupport.net
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |