Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

is there any way...???

Status
Not open for further replies.

dolphin1

Newbie level 4
Joined
Feb 19, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,329
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top