yviswanathbe
Full Member level 4
Hi Friends,
I am facing problem with Float variable in my program.
I am using keil microvision 3. I have included MATH.H
C51FPS.LIB is exists in the LIB folder.
Whats wrong i am doing here.
somebody please help me?
Thanks and Regards,
Viswanath.
I am facing problem with Float variable in my program.
Code:
void DAC_SET(void)
{
float crange, scale;
crange=(65535/40); //the result should be 1638.375 but i am getting 1638 integer part only.
scale=temprecord.current; //user desired value stored in a structure
DAC_Count=crange*scale;
}
I am using keil microvision 3. I have included MATH.H
C51FPS.LIB is exists in the LIB folder.
Whats wrong i am doing here.
somebody please help me?
Thanks and Regards,
Viswanath.