Quote Originally Posted by HenrikOlsson View Post
Code:
Frequency VAR WORD
Temp VAR WORD

Frequency = 49712 ' 4971.2Hz
Temp = Frequency * 21475 ' Produce the 32bit intermediate result
AddH = R0 ' Get high word from R0
AddL = R2 ' and low word from R2
Gosub PrintIt ' Display it

Pause 100
END

PrintIt:
HSEROUT["Frequency: ", DEC Frequency/10, ".", DEC Frequency//10, " AddValue: ", DEC AddH, " , ", DEC AddL,13] 
RETURN
If there are interrups involved, maybe it is a good idea to disable just before the routine, so R0 and R2 are not messed up.

Ioannis