Dividing two registers in MSP430??

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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
      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

Re: Dividing two registers in MSP430??

Quoted text here. Click to load it

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


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

Alf Katz


Site Timeline