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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/03/09 03:29
Read: times


 
#163008 - 32 or 16 bit division
Hi, I am looking for ASM code to percent (less then one) output. A easy example would be dividing 1/2 = .5. The purpose of this is to determine the position of the results of an ADC between two set-points.

A real world example is the following
Low set-point = 0D604h
High set-point = 0E24Dh
Reading = 0DC28h

Subtracting Low set point from high setpoint = 0C49h
Subtracting Low set point from reading = 0624

Dividing 0624h by 0C49 = 0.499 decimal

The above is the result I want but can't find a routine to do the divison.

Thanks

Dwight

List of 3 messages in thread
TopicAuthorDate
32 or 16 bit division            01/01/70 00:00      
   Suggest 8052.com Code Library            01/01/70 00:00      
   Division is shift and compare            01/01/70 00:00      

Back to Subject List