On 2/28/07, rolf wrote: > I am looking for a way to produce simple "lo-fi" audio > from a microcontroller pin, in a way that is very low cost. > In that sense, I am looking for a simple circuit, but don't > mind if there's some complexity in the software to drive it. > Think "toy" quality, not anything more. > > The circuit I am considering is simple: just a small speaker (8 ohm) connected > to a microcontroller pin through a series resistor (100 ohm). > There is also a small cap (e.g. 0.1uF) in series with the speaker to create > a crude low-pass filter. > This is pretty good at generating raspy-sounding square waves. > But, I am hoping that with some software tricks, I could do better, > and possibly play some digitized sounds (simple speech, etc.). > The microcontroller is of the $2-3 variety, and does not have a D/A. > > Anyone have a cool hardware/software hack for doing audio on the cheap? Roman Black's "picsound" is what you're looking for: http://www.romanblack.com/picsound.htm There is an even better version that uses 2 output pins: http://www.romanblack.com/btc_alg.htm Bill -- Psst... Hey, you... Buddy... Want a kitten? straycatblues.petfinder.org -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist