本帖最后由 hubinghuandi 于 2015-10-19 13:44 编辑
如题,下面的汇编代码看不太懂,请高手转换成C语言的,
这个是pic关于单项无刷风扇的,这个程序是PIC官网文档AN1178的附带例子程序中的一段,我想知道SHARED udata_shr ,BANK0 udata,res在这里的意思是什么
;; Flag variable definations
#define tmr0int 0 ; bit to show we've received a timer0 interrupt
#define locked 1 ; for a locked rotor condition
#define hallmeasure 2 ; use for starting/stopping a measurement
;; General Purpose Registers
SHARED udata_shr
w_save res 1 ; context saving
status_save res 1
BANK0 udata
flag res 1 ; generic flag variable
delay1 res 1
delay2 res 1
delay3 res 1
counthigh res 1 ; used for TMR2 ISR for counting for tach measurement
countlow res 1
tachlow res 1 ; used to store the tach measurement
tachhigh res 1
speedin res 1 ; duty cycle of the incoming speed PWM
compstate res 1 ; state variable to store comparator measurement routine
speedstate res 1 ; use for the speed state machine
tachspeed res 1 ; store the result of the divide routine here
temp res 1 ; outside of ISR temp variable
lockedcount res 1 ; store the number of times the rotor has tried to be freed
把全部完整的文件一起上传
cn558355_PIC16F616.zip
(17.75 KB, 下载次数: 7)
2015-10-19 13:28 上传
点击文件名下载附件
PIC官网AN1178程序范例
AN1178--智能风机控制.pdf
(623.5 KB, 下载次数: 5)
2015-10-19 13:29 上传
点击文件名下载附件
BANK0 udata 指定在BANK0 的範圍內
res 字节数
一周热门 更多>