AVR Code for Dividing 32-Bit Register by 8-Bit Register

Status
Not open for further replies.

Kerim

Member
Although my new codes of fast divisions may interest those who write in assembly only, I will end this topic by the following one.

In writing the code for an RMS current/voltage meter, I had to deal with big dividends (up to 32 bits) but the divisors could be from 160 to 223 only. So, I used the assembly code presented on the previous thread, “AVR Code for Dividing 32-Bit Register by 24-Bit Constant” after I added to it a table (as I did for the code on the thread “Fast AVR Code for Dividing 16-Bit Register by 8-Bit Register”). In this special case the table size is 256 bytes.
 

Attachments

  • Fast Division of 32-bit register by 8-bit register with rounding.txt
    6.8 KB · Views: 202
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…