Searching \ for '[PIC]: Imitation audio output from PIC?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=audio
Search entire site for: 'Imitation audio output from PIC?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Imitation audio output from PIC?'
2001\02\25@100137 by Drew Vassallo

picon face
Is there any way to output a short voice audio message from a PIC without
needing a D/A?  Is there any way to imitate this using other hardware or
maybe using tricks in PWM output?  I ran across some brief info on the
PICLIST, but haven't been able to get a lock on exactly what to do.

I'd assume that maybe 3-4KHz would be enough, and the message could possibly
fit in a 16F876 or similar.  I could sample the message input to the PIC
from the A/D through a mic and store the table in program memory (plus I
could probably get away with packing it into 2 7-bit values due to the
relative low quality required).  The output, though, is where I need help.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\02\25@120612 by Olin Lathrop

face picon face
> Is there any way to output a short voice audio message from a PIC without
> needing a D/A?  Is there any way to imitate this using other hardware or
> maybe using tricks in PWM output?  I ran across some brief info on the
> PICLIST, but haven't been able to get a lock on exactly what to do.

Yes, the PWM output can be easily used as a D/A.  I did 7 bit audio from
tables in memory on a 16F876 for a little Halloween project.  The PWM
frequency can be tens of KHz, so it can easily be filtered to produce smooth
analog output at voice frequencies.

> I'd assume that maybe 3-4KHz would be enough, and the message could
possibly
> fit in a 16F876 or similar.  I could sample the message input to the PIC
> from the A/D through a mic and store the table in program memory (plus I
> could probably get away with packing it into 2 7-bit values due to the
> relative low quality required).  The output, though, is where I need help.

I've done 7 bit audio from memory tables just as you describe.  However, you
will have problems writing the audio to program memory on the fly.  Note the
restrictions on writing to internal program memory.  You will have to use
external memory if you want to sample and retain audio at run time.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2001\02\25@121612 by Dan Michaels

flavicon
face
DrewV wrote:
>Is there any way to output a short voice audio message from a PIC without
>needing a D/A?  Is there any way to imitate this using other hardware or
>maybe using tricks in PWM output?  I ran across some brief info on the
>PICLIST, but haven't been able to get a lock on exactly what to do.
>

Take a look here - scroll down to figure 5:

http://www.circuitcellar.com/pastissues/articles/richey110/text.htm

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2001\02\25@210513 by Olin Lathrop

face picon face
> I'm extremely impressed with your Halloween 7-bit audio generated speech
> system that you invented.

Sorry, but I never said it did voice, only "audio".  This was a little gizmo
to scare the kids at Halloween.  It had two sets of 4 LEDs and a speaker as
output, and a photocell as input.  You hide it in a bush or up in a tree or
whatever so only the LEDs are visible.  They are mounted facing out from the
edge of the board to make the board invisible when the LEDs are pointed at
you.  The LEDs are arranged like this:

 oooo   oooo

The same single LED from each group (second from left, right most, etc) is
lit.  This is to simulate "eyes".  The eyes randomly shift left/right within
their 4 possible positions, and they also randomly "blink" by going off for
short periods.

The speaker is controlled from the filtered PWM output of the 16F876.  I
loaded the otherwise unused program memory with short snippets of spooky
sounds.  A randomly selected sound is played at random intervals.  These
sounds were converted from WAV files to MPLAB assembler files by a special
program I wrote for the purpose.  The sounds are fixed in any one build of
the firmware.  Two 7 bit samples are stored in each 14 bit program memory
location.  I just checked, and the sample playback rate is 1953/second,
although the PWM output was changed twice that often by interpolating
between samples.  At this setting, there is room for about 7 seconds of
sound in the program memory not used by the program.  The PWM frequency is
62.5KHz, and the PIC clock is 8MHz.

The photocell shuts down everything when it is too bright, or there is a
sudden increase in brightness.  This is to simulate the "animal" hiding and
keeping quiet when you shine a flashlight in its direction.

You will probably need a sample rate 2 to 4 times higher than what I used to
get reasonable voice out.  That would only give you about 2 to 3.5 seconds
total voice output.  Of course you could extend this greatly with external
memory.

> I'm doing a little project for the local search & rescue team here in New
> Zealand, that would benefit immensely from voice prompts, it may make the
> difference between someone being found or not.  I'm using a 16F876, just
> like you, and I was wondering if you could give me the source for your
> Halloween project.

I've been meaning to put the Halloween project on my web page as an example.
This hasn't happened yet because it's a lot of work, and so far I have only
gotten to putting the include files on the web
(http://www.embedinc.com/pic).  It doesn't sound like this would help
anyway, because I imagine you need more than 2 to 3.5 seconds of voice, and
you also wanted it to record voice.  You will definitely require external
memory because the program memory can only be written 1000 times, can't be
written anywhere near voice sample rates, and the whole processor goes to
lunch during a program memory write.

If your voice samples don't need to survive power down, you could just
connect a static CMOS RAM chip to the PIC (might want a 16F877 instead to
get the extra wires).  If the samples need to be non-volatile, you could
save them in IIC EEPROM, and load them into the CMOS RAM for use.  There are
also voice chips that are meant for this purpose, although I've never used
one.

Sorry my project isn't what you really wanted.


*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, EraseMEolinspam_OUTspamTakeThisOuTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\02\26@034402 by Roman Black

flavicon
face
Drew Vassallo wrote:
>
> Is there any way to output a short voice audio message from a PIC without
> needing a D/A?  Is there any way to imitate this using other hardware or
> maybe using tricks in PWM output?  I ran across some brief info on the
> PICLIST, but haven't been able to get a lock on exactly what to do.
>
> I'd assume that maybe 3-4KHz would be enough, and the message could possibly
> fit in a 16F876 or similar.  I could sample the message input to the PIC
> from the A/D through a mic and store the table in program memory (plus I
> could probably get away with packing it into 2 7-bit values due to the
> relative low quality required).  The output, though, is where I need help.
>
> --Andrew


Hi Andrew, you can actually use a non-pwm system
with one digital pin. More of a "comparator" style
system, if the audio is over 50% you set the
output to a high, if audio signal is less than 50%
you set the output to a low.

This system was used in the real early PC days
before digital audio cards. There was software
called "PC TALK" which did speech through the
1 bit digital PC speaker.

I also remember seeing open source C code to
do it with a PC speaker, I think it was GNU
code? Search the GNU C archives for free source
code.

Playback quality is slightly lower than a proper
one bit pwm output, but data compression is
excellent. Digitally you store the period between
high to low change, one byte is one period.
Similar audio quality to a second of 2kHz pwm
can be acheived with only a few hundred bytes
compared to 2000 bytes for the pwm method.

I coded something like this for the PC back
lots of years ago. The secret is getting good
voice samples is always critical in the recording
stage. You need to use a GOOD mic, mic amp,
compressor and graphic eq. $1000's of kit
needed. Do you have a musician or sound
recording friend? :o)
-Roman

PS, have you seen those super-cheap 16 second
sound recording chips?? Most now have multi-
message selection and might be an option?

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\26@084845 by Drew Vassallo

picon face
> > I'm doing a little project for the local search & rescue team here in
>New
> > Zealand, that would benefit immensely from voice prompts, it may make
>the
> > difference between someone being found or not.  I'm using a 16F876, just
> > like you, and I was wondering if you could give me the source for your
> > Halloween project.

I've used an ISD Chipcorder device (2500 series) with good success.  Check
out their website at http://www.isd.com.  I'd offer you my code, but I'm still
working on it at the moment and it may not be available for free
distribution even after I'm done.  But I can still answer questions for you
if you have them.

I love the chip, except for the physical size and number of peripheral pins
(lots of connections needed for good audio).  You can get them in storage
capacity of up to 120 seconds, plus you can daisy-chain them for even more
time if you need it.  Record and playback are pretty simple to control.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\26@091819 by Drew Vassallo

picon face
>PS, have you seen those super-cheap 16 second
>sound recording chips?? Most now have multi-
>message selection and might be an option?

Nope.  But I'd love to see them.  Any more info?  The best I've seen is a $5
ISD chip, which is a huge 28-pin thing, but works well and produces
excellent sound quality.

I don't need the excellent quality, but I do need the 16 seconds.  Also, I
need a small chip (8,14,18 pin would be nice).  One thing I don't like about
the ISD chip is that you have to buy their development system/software to
upload WAV files into the chip.  To put the same messages on multiple chips
is impossible without it.

--Andrew

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\26@100236 by Roman Black

flavicon
face
Drew Vassallo wrote:
>
> >PS, have you seen those super-cheap 16 second
> >sound recording chips?? Most now have multi-
> >message selection and might be an option?
>
> Nope.  But I'd love to see them.  Any more info?  The best I've seen is a $5
> ISD chip, which is a huge 28-pin thing, but works well and produces
> excellent sound quality.
>
> I don't need the excellent quality, but I do need the 16 seconds.  Also, I
> need a small chip (8,14,18 pin would be nice).  One thing I don't like about
> the ISD chip is that you have to buy their development system/software to
> upload WAV files into the chip.  To put the same messages on multiple chips
> is impossible without it.
>
> --Andrew

Hi Andrew, there are two sizes I remember seeing in
the local shop, but both were a SMD chip on a PCB
carrier about 28 DIP size. The "black epoxy blob"
style things. Maybe you could cut it down?

The store carries Jaycar and Altronics parts, it will
be one of those - in Australia. I think both do mail
order via internet. :o)
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\02\26@101259 by Wynn Rostek

flavicon
face
Drew,

The ISD 4004 offers 8 minutes of audio storage. The only drawback is the
need to invert the bit order of the commands and addresses sent to the chip.

Wynn Rostek

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...