Hello to the Keil Software Discussion Forum: My name is Randy Norris and I am with NORgate Engineering & Associates. We are considering using the 8051 for an online signal processing application and our question is this: Does the Keil 8051 C compiler have the capability to use arithmetic functions such as sin, cos, log, sqrt, etc? Our guess is that the answer is yes, and a statement at the beginning of the code like #include <math.h> would be required. However,this is only an educated guess. We have an evaluation version of Keil software from 2 years ago, and the User's Guide 11.97, but this documentation does not address our question. Thanks for your help. Randy Norris
All you want is there but not in the eval Erik
"We are considering using the 8051 for an online signal processing application and our question is this" Hmmm... The 8051 is a microcontroller - not a signal processor! Perhaps you could elaborate on exactly what sort of "signal processing" you envisage, and what you mean by "online" - particularly what sort of performance you require. "Does the Keil 8051 C compiler have the capability to use arithmetic functions such as sin, cos, log, sqrt, etc?" It's an ANSI 'C' compiler - so yes, it does. However, again, the 8051 is just a little 8-bit controller - floating-point maths is not its forte "this documentation does not address our question." All the library functions are described in the chapter headed, surprisingly, "Library Reference"
"All you want is there but not in the eval" Floating point functionality is excluded, but the full documentation is all there in the Eval download.
It will do them but another question would be how fast you need them done. This will give you some idea of the speed of the various function depending on which memory model you are using. http://www.keil.com/benchmks/tm_c51_v7_small.asp
It will do them but another question would be how fast you need them done. This will give you some idea of the speed of the various function depending on which memory model you are using. But do remember that you can get 100MHz one clockers (SILabs F12x) = 100 times faster than the "traditional" '51 Erik