i want using some number floating point
but in the end of the my routine i want convert this(floating) code to integer but i cant find any way please write for me a few line code
thanx to every body...
const int R=384;
int Rx //Rx is variable reading from port
float z,t
main(void){
read by y from RA1;
z=y/x;
if(z<1){t=1-z;x=x+x*t;} //add(or subtruct) tolerance to R(esistance)
if(z>1){t=z-1;x=x-x*t;}
Hi,
do specify the input range and output width required. In general you may have to do nothing other changing the definitions of the variables but in some cases you may have to take inti account the saturation and other issues.
brmadhukar