请各位大大帮我看下我这个程序到底哪里有问题,纠结了啊·我就是找不到问题出在哪,把这个程序下进去以后液晶显示屏完全不显示任何东西!~悲剧
ORG 0000H
LJMP MAIN
ORG 0100H
MAIN:
MOV R1,#01H
LCALL ZHILING
MOV R1,#02H
LCALL ZHILING
MOV R1,#38H
LCALL ZHILING
MOV R1,#0CH
LCALL ZHILING
MOV R1,#06H
LCALL ZHILING
MOV R3,#15
L1:
MOV R1,#80H
LCALL ZHILING
MOV A,#00H
MOV DPTR,#TAB
L2:
MOV R4,A
MOVC A,@A+DPTR
MOV R2,A
LCALL SHUJU
MOV A,R4
INC A
CJNE A,#15,L2
MOV A,#00H
MOV R3,#15
MOV R1,#0C0H
LCALL ZHILING
MOV DPTR,#TAB1
L3:
MOV R4,A
MOVC A,@A+DPTR
MOV R2,A
LCALL SHUJU
MOV A,R4
INC A
CJNE A,#15,L3
LJMP MAIN
ZHILING:
LCALL DUMAN
CLR P0.0
CLR P0.1
CLR P0.2
MOV P2,R1
SETB P0.2
RET
DUMAN:
CLR P0.0
SETB P0.1
CLR P0.2
M1:JB P2.7,M1
SETB P0.2
RET
SHUJU:
LCALL DUMAN
SETB P0.0
CLR P0.1
CLR P0.2
MOV P2,R2
SETB P0.2
RET
TAB:DB 2CH,58H,31H,31H,31H,31H,31H,31H,31H,31H,31H,31H,31H,31H,31H,31H
TAB1:DB 3FH,5FH,34H,31H,31H,31H,31H,31H,31H,31H,31H
END
控制用P0 P0.0是RS P0.1是RW P0.2是E P2是写数据的
求高手看看到底问题出在什么地方!~ |