51单片机 ADC0809模数转换汇编程序 程序有什么问题 数码管不显示(0—5)V
LJMPLOP1ORG0030HCLOCKBITP3.0STBITP3.1EOCBITP3.2OEBITP3.3ORG00HLOOP:CLRSTSETBSTCLRST;J...
LJMP LOP1
ORG 0030H
CLOCK BIT P3.0
ST BIT P3.1
EOC BIT P3.2
OE BIT P3.3
ORG 00H
LOOP:CLR ST
SETB ST
CLR ST;
JNB EOC,$
SETB OE
MOV 34H,P1
CLR OE
LOP0:MOV A,34H
MOV B,#50
DIV AB
MOV A,B
MOV B,#10
DIV AB
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P0,A
MOV A,B
MOVC A,@A+DPTR
MOV P2,A
CLR P0.7
LJMP LOOP
LOP1:MOV TH0,#245
MOV TL0,#0
CPL P3.0
RETI
TAB:DB 0C0H,0F9H,0A4H,0B0H,099H,092H,082H,0F8H,080H,090H;088H,083H,0C6H,0A1H,086H,08EH
END
ORG 00H
LJMP LOOP
ORG 000BH最
前面的3句漏了 展开
ORG 0030H
CLOCK BIT P3.0
ST BIT P3.1
EOC BIT P3.2
OE BIT P3.3
ORG 00H
LOOP:CLR ST
SETB ST
CLR ST;
JNB EOC,$
SETB OE
MOV 34H,P1
CLR OE
LOP0:MOV A,34H
MOV B,#50
DIV AB
MOV A,B
MOV B,#10
DIV AB
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P0,A
MOV A,B
MOVC A,@A+DPTR
MOV P2,A
CLR P0.7
LJMP LOOP
LOP1:MOV TH0,#245
MOV TL0,#0
CPL P3.0
RETI
TAB:DB 0C0H,0F9H,0A4H,0B0H,099H,092H,082H,0F8H,080H,090H;088H,083H,0C6H,0A1H,086H,08EH
END
ORG 00H
LJMP LOOP
ORG 000BH最
前面的3句漏了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询