How can I use Keil to compute exponential function? is use #include <stdlib.h>? thank you sir.
thank you for your suggestion very much, I need to calc complex number on 8051 because of I have to calc FFT. Also,I will try to produce my own function to calc complex no. thank you very much. I will ask you when I can solve this proble. (^_^) pattaraporn
I need to calc complex number on 8051 because of I have to calc FFT. Actually, you don't. Using the exponential notation in frequency analysis is merely a convenient way to pack a sine and a cosine function into a single expression. The only complex operations necessary are addition/subtraction and multiplication, which are trivial to implement. If you're using anything like calls to exponential or trigonometric library functions (instead of just using a lookup table), you're essentially doing the exact opposite of a Fast Fourier Transform, because the resulting code will run very slowly.
http://en.wikipedia.org/wiki/Cooley-Tukey_FFT_algorithm http://www.fftw.org/
I need to calc complex number on 8051 because of I have to calc FFT. Says who? Who decided that an 8051 was an appropriate choice of processor to run an FFT on? Is that person generally crazy, or did (s)he just want to make you miserable in this particular case? That said, no, you don't need complex numbers to implement an FFT. They're convenient to use if you have them, but they're quite definitely not worth the hassle of implementing them from scratch just to use them in an FFT. Morale: you'll want to learn a lot more about 8051's, C and FFT before you go anywhere near implementing this.
Is that person generally crazy, or did (s)he just want to make you miserable in this particular case? Maybe it is a special, hidden kind of test for the students. Will they realize that their target hardware is not suited for the task, or will they not ?
This tech note might be of interest. Though it's not for an 8051, it is for a low-powered 16-bit micro without floating point hardware. http://www.maxim-ic.com/appnotes.cfm/appnote_number/3722
"Will they realize that their target hardware is not suited for the task" I wonder how the capability of an 8051 compares to the computing facilities available to Cooley & Tukey at the time of their 1965 paper...? Discuss.
I wonder how the capability of an 8051 compares to the computing facilities available to Cooley & Tukey at the time of their 1965 paper...? That's actually quite irrelevant. Even if, as I would guess, a modern-day high-end 8051 can outperform anything available to the inventors of the algorithm, using one of those today, when other hardware outperforms them by orders of magnitude, is exactly as wrong as if that weren't the case. Using an 8051 to do an FFT today is about as crazy an idea as using a screwdriver to dig a grave when there's a shovel available.
"That's actually quite irrelevant" I didn't say it was relevant - I just offered it as an interesting thought. I think you can tell from my previous posts in this thread that I very much doubt the applicability of an 8051 to this project...
Thank you very much, I'll ask you when I finish my project. ^_^ pattaraporn