Taking A value from a DS1302 and Multiply 1.7 Posted the Routine to get this t
Hi EveryOne
This is a project that I have been ·ask to do·by employer
As of right now I can not give all of the details.......................
................·but when the Project is done I will share with all of you on the Forum
We have a process that we do that we need to keep track of how much product·is left in the ·silo
so we can call th vendor to order more product there is NO WAY to put a scale to weight the silo
The only way is to do this is time how much ·product is used in one minute and keep track of it that way
Now I know how to Start and Stop The DS1302 Time Chip
And I can get the amount of product that is used in one minute
What I need to know is how to take the TIME VALUE and the AMOUNT OF PRODUCT in ONE MINUTE
and keep track of how much product is left in the SILO
I am not very good doing the P Basic Math
So is there any one out there that can help me with this problem
Let Just use 1.7 pound that are being·used in one minute
How would you write the code to do this
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 5/4/2009 4:14:15 AM GMT
This is a project that I have been ·ask to do·by employer
As of right now I can not give all of the details.......................
................·but when the Project is done I will share with all of you on the Forum
We have a process that we do that we need to keep track of how much product·is left in the ·silo
so we can call th vendor to order more product there is NO WAY to put a scale to weight the silo
The only way is to do this is time how much ·product is used in one minute and keep track of it that way
Now I know how to Start and Stop The DS1302 Time Chip
And I can get the amount of product that is used in one minute
What I need to know is how to take the TIME VALUE and the AMOUNT OF PRODUCT in ONE MINUTE
and keep track of how much product is left in the SILO
I am not very good doing the P Basic Math
So is there any one out there that can help me with this problem
Let Just use 1.7 pound that are being·used in one minute
How would you write the code to do this
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 5/4/2009 4:14:15 AM GMT
Comments
To multiply by 1.7 ...
Take 1.7 and multiply that by 256 on a calculator and you get 435.2
Since the BS2 can only do integer math, 435.2 becomes 435. So instead of 1.7 you are actually multiplying by 1.6992· (<-- 435/256 = 1.6992.. )
NewNum = OldNum */ 435
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Thank You for making this very easy to understand···· ·
This will Help alot
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 5/1/2009 1:37:32 PM GMT