This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430FR6989:在 CCS 中编写代码

Guru**** 633810 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1199050/msp430fr6989-writing-a-code-in-ccs

器件型号:MSP430FR6989

我使用 sub.w 函数来查找 dst 和 src 之间的差异。 我的问题是如何将这些整数转换为其绝对值? 并将它们全部添加到单独的寄存器(R7)中

我的代码:

loop_mad_diff:

			sub.w	mean_1,samples(R6)
			add.w	samples(R6),R7

			incd.w	R6

			cmp.w	#2*n, R6
			jlo		loop_mad_diff

忽略最后三行。