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 |
Date: | Thu, 2 Jan 2014 21:53:02 -0800 |
From: | Larry Doolittle <ldoolitt AT recycle DOT lbl DOT gov> |
To: | geda-user AT delorie DOT com |
Subject: | Re: [geda-user] Help sending a sine wave to a speaker |
Message-ID: | <20140103055302.GA27100@recycle.lbl.gov> |
References: | <CALSZ9go-H-4HnAfvdQyLsVEcbNG0pT33wEM=G-CfZmDXVcMQrw AT mail DOT gmail DOT com> |
<20140103033741 DOT 18215 DOT qmail AT stuge DOT se> | |
MIME-Version: | 1.0 |
In-Reply-To: | <20140103033741.18215.qmail@stuge.se> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
Reply-To: | geda-user AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | geda-user AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Friends - On Fri, Jan 03, 2014 at 04:37:41AM +0100, Peter Stuge wrote: > Rob Butts wrote: > > I use a microchip pic16f1825 to read a byte from an eeprom via spi > > and send it to a dac and ultimately to a speaker. > If you want to use sin in production maybe you should go for a > precalculated lookup table. On fixed-point and/or small microprocessors, a CORDIC will often win over the generic libc sin(). If you know the accuracy you need, you can tune the number of stages. On a strongarm, I once saved a factor of 1000 in CPU time. The table-based approach is sometimes useful, but not as general. - Larry
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |