??? 06/26/05 16:49 Modified: 06/26/05 17:01 Read: times |
#95963 - int/float Responding to: ???'s previous message |
Leo Paul said:
I found, this is due to the tic12, which evalutes to 0.5425, hence the compiler treats it as zero." clealy if preprocessor taking tic12 as '0' it is converting the tic12 to an integer. this is done because preprocessor is taking division as integer division. i think this will work #define Xtal 22.1184 #define tic12 (12/Xtal) #define _10msec (65536 - ((1000.0 * 10.0) / tic12)) Abhishek |