Dividing two registers in MSP430??

Apr 23, 2005 1 Replies

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


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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required