dsPIC33汇编指令
最近在看从Microchip官网上下载的电机控制代码,其中一部分是汇编代码:
.include "general.inc"
; External references
.include "MeasCurr.inc"
.include "Park.inc"
.global _MeasCompCurr
.global MeasCompCurr
_MeasCompCurr:
MeasCompCurr:
;; CorrADC1 = ADCBUF1 - Offseta
;; qIa = qKa * CorrADC1
mov.w _ADC1BUF1,w0
sub.w _MeasCurrParm+ADC_Offseta,WREG ; w0 = ADC - Offset
mov.w w0,w5
mov.w _MeasCurrParm+ADC_qKa,w4
mpy w4*w5,A
sac A,#0,w4
mov.w w4,_ParkParm+Park_qIa
;; CorrADC2 = ADCBUF2 - iOffsetb
;; qIb = qKb * CorrADC2
mov.w _ADC1BUF2,w0
sub.w _MeasCurrParm+ADC_Offsetb,WREG ; w0 = ADC - Offset
mov.w w0,w5
mov.w _MeasCurrParm+ADC_qKb,w4
mpy w4*w5,A
sac A,#0,w4
mov.w w4,_ParkParm+Park_qIb
return
.global _InitMeasCompCurr
.global InitMeasCompCurr
_InitMeasCompCurr:
InitMeasCompCurr:
mov.w w0,_MeasCurrParm+ADC_Offseta
mov.w w1,_MeasCurrParm+ADC_Offsetb
return
.end
上面代码中关于MOV.W SUB.W等指令在指令集详解部分没有找到相关的描述,里面只有MOV.B /MOV /SUB等指令描述。不知道有何区别。
求指点或给出相关的文档链接地址。
|