Full Version : DIV16_XX Math Routines (AVR ASM)
avr >>ASSMBLER ROUTINES >>DIV16_XX Math Routines (AVR ASM)


AVR_Admin- 04-16-2006
16-bit division by constants (3-23)

ASM library for divisions of 16-bit numbers by constants (range 3-23) using scaled reciprocal multiplication.
HW-multiplier ("mul" instruction) required.
Functions typically need ~36 cycles (w. remainder) or ~27 cycles (w/o rem.)
2003-Feb-12: added /18, fixed errors
2003-Feb-15: added /20, added "C-style" function with macro to perform a constants division with all divisors from 2 to 20 from one module
2003-Feb-24: added /21-/23 (stand-alone & module)
2002-Feb-24: everything speeded up by ~20% (thanks to J-H Reichert)
2006-Mar-24: added /60 for RTC related apps., fixed bug (Q>>4)in several modules

Link to Site: http://www.avrfreaks.net/index.php?module=...em_type=project


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.