Well I think there is a easier way to do what you want to do. doing a google search I have found that 1 kmh is equal to .6213 mph. what is km and km1?
Well I think there is a easier way to do what you want to do. doing a google search I have found that 1 kmh is equal to .6213 mph. what is km and km1?
Regards
CharlieM
Using PBP3
MCSPX
Thank you for that revelation. What do you think the result of (1006/1619) is?You're probably right. However, if I knew what that easier way was, I wouldn't have posted the question in the first place. I guess you're going to leave that proverbial carrot right in front of my face. Or, do you really know what that easier way is?I'm using an 18F4550.My guess is with such large numbers that you would probably have to do such math with PBPL on a 18Fxxxx device.
Have you seen the PBP manual, section 3.1.2?
Dave
Always wear safety glasses while programming.
Yes, that was one of the first things I tried. One question though. You say 3.1.2 and in my manual that's page 17 where they reference command line options. I went to page 45, which is section 5 and it shows the statement references. Is 3.1.2 relevant to this problem?
Anyhow, they show how to go from MPH to km (*/), but not the other way around. Maybe I'm just not plugging the numbers in correctly. I thought about using the DIG command but that seemed overly complex to get a simple conversion.
miles = km */ 159
Should work.
Dave
Always wear safety glasses while programming.
You don't have to be a smart ass. Why don't you just multiply you km value by 6213/1000? it seems easy to me. maybe I am missing something.
Thank you for that revelation. What do you think the result of (1006/1619) is?
Regards
CharlieM
Using PBP3
MCSPX
I made my comment because of yours:You don't have to be a smart ass.It's as if you said, "I spent 30 seconds on Google and found out that 1 kmh is equal to .6213. You couldn't have tried to research this problem at all."doing a google search I have found that 1 kmh is equal to .6213 mph.
In response to your current question, ofYes, you are missing something. Did you read my first post?Why don't you just multiply you km value by 6213/1000? it seems easy to me. maybe I am missing something.
Did you ever try to do 98 X 256 X 6.213 on an 18F4550?I can do it the other way where it's 6.21.....Then if the speed is over 65 MPH, it rolls over due to a word sized variable.
Bookmarks