- 1、本文档共23页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
pid汇编控制程序(国外英文资料)
pid汇编控制程序(国外英文资料)
; Chen. Asm
Include vector.h; Establish an interrupt to scale
Include lf2402.h. Header file
Def _c_int0
. Mmregs
Sect .costab
Costab. Include cos. TAB
Sect .firtab
Firtab. include fir.
* * * * * * * * * * * * * * * * * * * * *
; The main program
The text
_c_int0
CALL SYSINIT
CALL IOINIT
CALL EVAINIT
SYSINIT:
SETC INTM
SETC OVM
SETC SXM
CLRC XF; To verify that the interrupt is interrupted
SETC CNF; The B0 area is configured as a program space
SPM 0
LDP # 0
SPLK # 0007H, IMR; Enable interrupt priority INT1, INT2, INT3
SPLK. Qing interruption sign
LDP # 07H
SPLK # 0, TT
OUT TT, WSGR; Waiting for registers, the number of clock cycles inserted while reading external memory
* * * * * * * * * * * * *
; The variable initialization
SPLK # 0h, count
SPLK # 0h, index
SPLK # 0, tmpAD
SPLK # 0, VE0
SPLK # 0, VE1
SPLK # 0, VE2
SPLK # 0, U
SPLK # 0, PIDTMP2
; SPLK # 0, U2
* * * * * * * * * * * * *
RET
IOINIT:
LDP # DP_PF1; Point to 7000 h to 7080 h area
SPLK # 8005H, XINT1CR
LDP # DP_PF2
SPLK # 21C4H, MCRA
; SPLK # 0400H, MCRC
; SPLK # 0 ff00h PADATDIR
; LACL MCRB
; OR # 0FF00H
; SACL MCRB
RET
EVAINIT:
LDP # DP_EVA; Point to 7400 h to 7480 h area
SPLK # 0200H, EVAIMRA; To interrupt T1UFINT_2
SPLK, EVAIFRA; EVA interrupt flag
SPLK # 60C6H, GPTCONA
SPLK # 3000, T1PR; Causes the timer to be interrupted every 0.1 ms
SPLK # 0, T1CNT
SPLK # 02700H, COMCONA
SPLK # 0A700H, COMCONA
ACTRA SPLK # 016 h
DBTCONA SPLK # 0474 h
SPLK # 0, CMPR1
SPLK # 0, CMPR2
SPLK, T1CON; Continuous adding and subtracting counts
SPLK, EVAIMRB; Can make T2PINT interrupts
SPLK # 0 FFFFH EVAIFRB
T2PR SPLK # 9376
SPLK # 0, T2CNT
T2CMPR SPLK # 4688
SPLK # 0 d4ah T2CON
ADINIT:
LDP # 225; Point to 7080 h to 7100 h
SPLK # 4002H, ADCTRL1
SPLK # 2002H, ADCTRL1
SPLK # 0H, MAXCONV; Adopt 1 road signal
SPLK # 0001H, CHSELSEQ1
SPLK # 4100H, ADCTRL2
SPLK # 0100H, ADCTRL2
* * * * * * * * * * * * *
CLRC INTM; Open always interrupt
WAIT the NOP
B, WAIT
The interruption procedure * * * * * * *
GISR1:
The LDP # 0
文档评论(0)