内容发布更新时间 : 2024/11/15 0:27:05星期一 下面是文章的全部内容请认真阅读。
系统设计报告
整体PCB图
附件B:
PROTEUS仿真图
附件C:本系统所用程序: DIN BIT P1.0
CLK BIT P1.1 JR BIT P1.2 F1 BIT 21H
ORG 0000H SJMP MAIN ORG 0003H LJMP INT00 ORG 000BH LJMP INTDISP ORG 0030H MAIN: SETB EA SETB EX0 SETB ET0
MOV TMOD,#01H MOV TH0,#3CH MOV TL0,#0B0H mov 20h,#10
SETB TR0 ;中断初始化
第11页
系统设计报告
CLR F1
CJ1: MOV R0,#30H LCALL D1S LCALL AD0809 MOV B,A
CJ2: MOV R0,#31H LCALL D1S LCALL AD0809
CJNE A,B,COMP LJMP CJ2
COMP: CJNE A,#30H,N30 SETB CTRO LJMP CJ1 N30: JNC COM96 SETB JR LJMP CJ1
COM96:CJNE A,#96H,N96 CLR JR LJMP CJ1 N96: JC COMAB CLR JR LJMP CJ1 COMAB:CJNE A,B,DR LJMP CJ2 DR: JC DOWN RISE: SETB JR LJMP CJ1 DOWN: CLR JR LJMP CJ1
AD0809: ; MOV DPTR,#0FFF8H LOOP:
MOVX @DPTR,A MOV R7,#0AH DELAY: NOP NOP NOP
DJNZ R7,DELAY
MOVX A,@DPTR MOV DPTR,#TBCD
数据采集转换第12页
系统设计报告
MOVC A,@A+DPTR MOV @R0,A RET
DISP0: ;拆分 MOV R1,#40H MOV A,@R0 MOV B,A ANL A,#0F0H SWAP A MOV @R1,A inc R1 MOV A,B ANL A,#0FH MOV @R1,A RET
DISP1: ; MOV R0,#40H MOV R1,#50H MOV R7,#2
L1:MOV DPTR,#SEGTAB MOV A,@R0
MOVC A,@A+DPTR MOV @R1,A INC R0 INC R1 DJNZ R7,L1 RET
DISP2: ; MOV R0,#50H MOV R1,#2 L2:MOV A,@R0 MOV R7,#8 L3:RLC A MOV DIN,C CLR CLK SETB CLK DJNZ R7,L3 INC R0 DJNZ R1,L2 RET DISP:PUSH ACC PUSH B mov 33h,r0
查表 显示 第13页
系统设计报告
LCALL DISP0 LCALL DISP1 LCALL DISP2 mov r0,33h POP B POP ACC RET
D100MS:MOV R3,#200 DEL0: MOV R4,#125 DEL1: DJNZ R4,DEL1 DJNZ R3,DEL0 RET
D1S: MOV R5,#10 DEL2: CALL D100MS DJNZ R5,DEL2 RET
INT00:
JNB F1,LINT CLR JR
SJMP RETURN LINT:SETB F1 LCALL D1S RETURN: RETI
INTDISP:
PUSH ACC PUSH B
MOV TH0,#3CH MOV TL0,#0B0H djnz 20h,back mov 20h,#10 LCALL DISP back:POP B POP ACC RETI
TBCD:DB 00H,00H,01H,01H,02H,02H,02H,03H DB 03H,04H,04H,04H,05H,05H,05H,06H DB 06H,07H,07H,07H,08H,08H,09H,09H DB 09H,10H,10H,11H,11H,11H,12H,12H DB 12H,13H,13H,14H,14H,14H,15H,15H
第14页
系统设计报告
DB 16H,16H,16H,17H,17H,18H,18H,18H DB 19H,19H,20H,20H,20H,21H,21H,21H DB 22H,22H,23H,23H,23H,24H,24H,25H DB 25H,25H,26H,26H,27H,27H,27H,28H DB 28H,28H,29H,29H,30H,30H,30H,31H DB 31H,32H,32H,32H,33H,33H,34H,34H DB 34H,35H,35H,35H,36H,36H,37H,37H DB 37H,38H,38H,39H,39H,39H,40H,40H DB 41H,41H,41H,42H,42H,43H,43H,43H DB 44H,44H,44H,45H,45H,46H,46H,46H DB 47H,47H,48H,48H,49H,49H,49H,50H DB 50H,50H,51H,51H,51H,52H,52H,53H DB 53H,53H,54H,54H,55H,55H,55H,56H DB 56H,57H,57H,57H,58H,58H,59H,59H DB 59H,60H,60H,60H,61H,61H,62H,62H DB 62H,63H,63H,64H,64H,64H,65H,65H DB 66H,66H,66H,67H,67H,67H,68H,68H DB 69H,69H,69H,70H,70H,71H,71H,71H DB 72H,72H,73H,73H,73H,74H,74H,74H DB 75H,75H,76H,76H,76H,77H,77H,78H DB 78H,78H,79H,79H,80H,80H,80H,81H DB 81H,82H,82H,82H,83H,83H,83H,84H DB 84H,85H,85H,85H,86H,86H,87H,87H DB 87H,88H,88H,89H,89H,89H,90H,90H DB 90H,91H,91H,92H,92H,92H,93H,93H DB 94H,94H,94H,95H,95H,96H,96H,96H DB 97H,97H,98H,98H,98H,99H,99H,99H
SEGTAB: DB 77H,14H,0B3H,0B6H,0D4H DB 0E6H,0E7H,34H,0F7H,0F6H END
第15页