Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/26/06 11:13
Modified:
  01/26/06 11:34

Read: times


 
#108349 - Constant X value
Responding to: ???'s previous message
Use 33 as constant (330 m/s) and multiply it every time by the value in ms (which then can be 0-255). You get 16 bit product, (after MUL AB, higher byte is in B and lower in A). Use a program from our library, which transforms 16 bit to 5 BCD digits, which you can then send directly to display. The decimal point will be fixed and its positon depends on the units you are using.

If the time value could be higher than 255 ms (but less than 512), you can use a trick to divide higher and lower by 2 (2 times RRC A) and multiply the lower by 66 (higher is 0)!


Regards, Slobodan

List of 7 messages in thread
TopicAuthorDate
multiplication problem            01/01/70 00:00      
   what is the input and output?            01/01/70 00:00      
   Whats the plan ??            01/01/70 00:00      
   It's about units            01/01/70 00:00      
      Units - example            01/01/70 00:00      
      Speed            01/01/70 00:00      
   Constant X value            01/01/70 00:00      

Back to Subject List