Hello FvM, thats for reply
As far as i know, the preprocessor is replaced by numbers during precompilation step i.e.
for eg.
int a, b;
b=27000;
a=COUNT_TO_SPEED/b;
so, in preprocessing step, the COUNT_TO_SPEED is replaced by formula and the contents of formula are replaced by numbers if they are constants. SO, when actual compilation happens, if the compiler sees something like this (300/100), it calculates the formula and substitutes 3 in code memory. In most of my constants this is happening except the one i have noted above. So, as in code snippet above shown, that is how im using COUNT_TO_SPEED in .c code file for calculation. But, actually, this #define constant seem not to be evaluated at compilation since the result of this computation is a floating point number which is not ending after decimal point. The result in above variable a is at ceiling of int range, hence im getting always 100% duty cycle and cannot vary the controlled variable. But im not completely sure of this...
Thats why i am looking for solution to this, if i can truncate or round this in some way?
Im not experiencing any compiler error BTW.