| ??? 06/27/05 12:53 Read: times |
#96009 - Floating-point not supported in eval Responding to: ???'s previous message |
The following code will work perfectly.
#include <reg51.h>
#define Xtal 22.1184 // = 22.1184
#define tic12 (12/Xtal) // = 0.54253...
#define _10msec (unsigned)(65536 - ((1000.0 * 10.0) / tic12))
//= 65536 - ( 10000.0 / 0.54253...)
//= 65536 - 18432.0
//= 47104 = 0xB800
void main (void)
{
float aaa;
aaa = _10msec;
TL1 = _10msec;
TH1 = _10msec >> 8 ;
while(1);
}
However... i'm a bit confused, i recently started working with eval version of keil. The eval version of the Keil tools does not include floating-point support. Jon |



