??? 06/29/05 17:29 Read: times |
#96214 - Not a good idea Responding to: ???'s previous message |
Leo Paul said:
I find this feature useful in writing crystal depended definitions. But it has been explained why using a floating-point value is not a good idea: "not only is the use of floating-point unnecessary - it could actually give you the wrong result!" http://www.8052.com/forum/read.phtml?id=96034 The reason it's not a good idea due to the fundamental nature of the implementation of floating-point arithmetic - thus it is not compiler-specific, nor even processor-specific. All you need to do is to change your XTAL definition from a floating-point number of MHz to an integer number of Hz (or even kHz), and scale accordingly. |