谢谢俩位的回答也许我没有表达清楚,我用的是uV2,也按装了插件,也找到了sh78f1615,建立了工程,试着学点灯,在uV2中用汇编写了一个点灯的小程序,设置为输出模式,故用到了,P0CR,P1CR等,编译不能通过,以下是我的小程序:
ORG 0000H
LJMP START
START: MOV SP, #30H
NOP
NOP
NOP
MOV P0CR, #47H ;01000111
MOV P1CR, #03H ;00000011
MOV P2CR, #60H ;01100000
MOV P3CR, #34H ;00110100
LOOP: MOV P0, #47H
MOV P1, #03H
MOV P2, #60H
MOV P3, #34H
ACALL DELAY_1S
MOV P0, #00H
MOV P1, #00H
MOV P2, #00H
MOV P3, #00H
ACALL DELAY_1S
SJMP LOOP
DELAY_1S: MOV R7, #0CDH
DL1: MOV R6, #0E6H
DL0: MOV R5, #0FDH
DJNZ R5, $
DJNZ R6, DL0
DJNZ R7, DL1
MOV R5, #0FH
DJNZ R5, $
NOP
RET
END
请帮忙看看到底是什么原因谢谢! |