Arm Community
Site
Search
User
Site
Search
User
Support forums
Keil forum
Problem with calculation
State
Not Answered
Locked
Locked
Replies
10 replies
Subscribers
19 subscribers
Views
1561 views
Users
0 members are here
Keil C166 Tools
Options
Share
More actions
Related
How was your experience today?
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
Problem with calculation
Andrew Jordan
over 19 years ago
Hi
I have been trying to use the equation:
int Temp; Temp = 680*((N-82)/(920-82)); return Temp;
N=920 - I would expect temp would be 680 and the result is 680 which is correct
But when I tried to use other values below, I keep getting zero.
Then N - 900
Result: 0
adc_result - 700
result:0
adc_result - 500
result:0
adc_result - 300
result:0
adc_result - 100
result:0
I don't understand why this happened.
Arron
0
Quote