This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Whats happening here ??

Hallo everybody,

got myself another problem.... not exactly a problem... i think
The thing is i would like to know whats happening in this output:

printf("AIN[%d][%d] = %u.%.3u V\n",m,n,(int)(AD_ARRAY[m][n]/V_SCALE),(int)(AD_ARRAY[m][n]%V_SCALE)*R_SCALE);

The preprocessor declarations are :

ine V_REF 5
#define V_SCALE (0xFF/V_REF)
#define R_SCALE (99/V_REF)

I am using a 80C535 µC and the AD_ARRAY[m][n] saves the actual ADC value of the sample and im using µVision2

Thanks for the help
Andy

Parents Reply Children
No data