On Mar 6, 10:50 am, Rob Hamerling <[email protected]> wrote:
> Since you seem to have experience with trigonometric functions..... > 'sin' and 'cos' (and maybe more) would be nice to have in the 'math' > library. May I invite you for this task? > > Regards, Rob. No problem. I first did 16bit/32 bit math library for 78HC11 in assembler in 1983. It only has 8 bit add and complement built in :( Then debugged some 8051 asm math. Back then I was doing PID, thermocouple compensation/linearise, low pass filtering all on Z80, 78HC11, 8051 in Forth, ASM and Blockware for Westinghouse. You have now sin/ cos. For more accurate use a table of 180 values of sin 0 to sin 90 at 0.5 degree intervals scaled by 65536 -1, do lookup and add one. Use degrees x 2 as the fixed point integer. i.e. 75.5 = 151 For Powers and Roots, use a table of Logs (scaled to fixed point integer) and then use kyle's builtin multiple & divide. Then for antilog to save space do a split binary search on the log table array. 1000 entries only takes 10 lookups worst case to find antilog. see also http://en.wikipedia.org/wiki/Cordic We can have DSP library that can do ANYTHING a DSP chip or FPGA can do... The only limitation is speed and RAM! Many applications exist that are < 100Hz speed or even < 0.1Hz. (Heating control PID etc) If you use the Sin lookup and PWM, you can generate sine wave where sample rate is PWM frequency. If you add Sin lookups at different phases and speeds (sum of Fourier series) you can use PWM or I2C DAC or resistors on a port to make a DAC to synthesis arbitrary waveform and frequency up to maybe 100kHz. By mix of samples (add different angles + sample rates of SinLookup Table) you can have flute, piano, violin sound. You then use an envelope lookup table to scale the amplitude at start and end of note. see http://en.wikipedia.org/wiki/Category:Signal_processing What do people need? -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
