Dividing two registers in MSP430??

Haw to divide two registers eg. R8/R7 in MSP430. Do I have to use only hardware multiplier. To multiply you have to: ; 16x16 Unsigned Multiply MOV R5,&MPY ; Load first operand into appropriate register MOV R6,&OP2 ; Load 2nd operand Result is now available But haw to divide these two registers?

Examples would be helpful. Great thanks in advance

Reply to
chomiczuk81
Loading thread data ...

You need to re-learn long division. Google "MSP430 divide source" found this on the first of many pages of hits:

formatting link
df

It includes source code for a divide function. I haven't tested it. Good luck.

-- Alf Katz

snipped-for-privacy@remove.the.obviousieee.org

Reply to
Unbeliever

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.