> -----Original Message----- > From: Olin Lathrop [SMTP:olin_piclist@EMBEDINC.COM] > Sent: Tuesday, April 08, 2003 1:20 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: A metronome project > > > I've often wondered (ok, not THAT often) how to get a microcontoller to > > generate a convincing "tick" or "tock" sound out of a speaker. Little > > beeps are just ... inelegant, and simply driving the cone with DC seems > > like it would be too short... > > I did this once by running a 5V pulse into a speaker. I sortof remember > it was in the 1 to 10mS range, but this was a long time ago. If the pulse > is too long, you hear both edges. If it's too short, the volume is > reduced. The pitch largely depends on the characteristics of the speaker. > > A capacitvely coupled square wave works ok. You get a loud tick on every edge and don't keep DC current running through the speaker. for the ultimate you could sample the tick and tock from a classic metronome and pay them back via a DAC or PWM. Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics