sine routines

Started by CAFxX January 14, 2004
"CBarn24050" <cbarn24050@aol.com> wrote in message
> hi, this is the simplification of the compound angle formulas, it works
> well and can be quite quick but not as fast as a lookup table.
in context: I had to drive a stepper motor around 1 metre diameter circles with an accuracy of 0.1 mm using a 2K EPROM ======== original post: I am sorry, terribly busy, but you can get there from here (I had to) circles ( and sines, fit for your purpose) using only add and subtract X = 100: y = 0 FOR i = 1 TO 1000 PRINT X, y X = X - y / 256 y = y + X / 256 NEXT If you cannot do it I will dig out the Scamp (INS8060) code, eventually. David F. Cox ======
In article <4006935e$1@news.nb.nu>
           mhsprang@NOcustomSPAMware.nl "Meindert Sprang" writes:

> "CAFxX" <cafxx@n-side.it> wrote in message > news:bu634c$7g9$1@lacerta.tiscalinet.it... > > what i need to do is to generate a custom-frequency sine wave to be > > outputted at CD-quality frequency (44100 samples/second) to a DAC. > > If that is all you have to do, take a look at Analog Device's DDS chips.
He could also do a search on DDA routines. These are simple add and shift routines that can often be done in a few machine cycles. John Matthews book has an example in for this (Engineering Applications in Forth). -- ******************************************************************** Paul E. Bennett ....................<email://peb@amleth.demon.co.uk> Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/> Mob: +44 (0)7811-639972 .........NOW AVAILABLE:- HIDECS COURSE...... Tel: +44 (0)1235-811095 .... see http://www.feabhas.com for details. Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************