David VanHorn wrote: > > At 08:45 PM 2/10/02 +0000, Stuart Meier wrote: > >After a spell on other things, I am back to a PIC project, and need to > >generate a 'Dong' sound (as in "ding-dong", without the ding..) > > > >On cost grounds I can't go the ISD route, so I want to store and output > >a waveform from a 12C PIC. Question is, how can I easily create the > >table of tones/durations required? As I am tone deaf, trial and error > >could take a lifetime... > > You're in luck. Square waves, and bells, have a lot of harmonics. > Mostly, you need to adjust the pulse width, so as to change the amplitude. > A bell has a sharp attack, and slow delay. > > 00095311111 like that. Or alternatively, just get the sound you want as a windows wave file, then you can use this free picsound encoder software to encode that wave into a tiny bitstream suitable for playback on any pic with a couple of external parts. :o) The bitstream for your "dong" will only take 1k or so, you may not need the I2C storage if you can put the sound into PIC memory itself. Here's the encoder software: http://centauri.ezy.net.au/~fastvid/picsound.htm -Roman -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu