ch375 汇编

我有一个别人给的ch375接收红外投影的程序 ,看不懂 哪个高手帮我看看啊 万分感谢啊 DAT EQU P1 CS BIT P2.0 WRT BIT P2.1 RED BIT P2.2 A0 BIT P2.3 LONG EQU 70H QST EQU 71H TAB EQU 72H ADR EQU 73H NUM EQU 74H KEY EQU 75H FLAG BIT 20H.0

ORG 0000H SJMP MAIN ORG 0003H LJMP INTX0 MAIN:CLR EA SETB EX0 SETB IT0 MOV SP,#50H MOV A,#15H CALL WRC MOV A,#01H CALL WRD CALL DELY MP1:CALL RDD CJNE A,#51H,MP1 SETB EA CALL LED

JP1:JNB P2.4,$ JP2:INC DPTR JB P2.4,JP2 MOV A,DPH CJNE A,#3,JP3 SJMP JP4 JP3:CJNE A,#4,JP5 SJMP JP4 JP5:MOV DPTR,#0 SJMP JP1 JP4:MOV R0,#16 JP6:JNB P2.4,$ JB P2.4,$ DJNZ R0,JP6

MOV DPTR,#0 JP7:JNB P2.4,$ JP8:INC DPTR JB P2.4,JP8 MOV A,DPH CJNE A,#0,JP9 MOV KEY,#52H CALL WRK CALL LED SJMP JP1 JP9:MOV KEY,#51H CALL WRK CALL LED SJMP JP1

INTX0:CALL RDI JNB ACC.0,LP1 JNB ACC.1,LP1 MOV QST,#0FFH CLR FLAG CALL ULOCK SJMP LP0

LP1:CJNE A,#0CH,LP2 CALL SETOK SJMP LP0

LP2:CJNE A,#08H,LP3 MOV A,QST CJNE A,#6,L21 CALL UPDES CALL ULOCK SJMP LP0 L21:CJNE A,#5,L22 MOV A,#13H CALL WRC MOV A,ADR CALL WRD L22:CALL ULOCK SJMP LP0

LP3:CJNE A,#00H,LP4 CALL ULOCK SJMP LP0

LP4:CJNE A,#09H,LP0 MOV A,KEY CJNE A,#0,L41 CALL ULOCK SJMP LP0 L41:MOV KEY,#0 CALL WRK CALL ULOCK LP0:RETI

SETOK:CALL RDU MOV R6,A MOV R7,A MOV R0,#30H SET1: CALL RDD MOV @R0,A INC R0 DJNZ R7,SET1 CJNE R6,#8,SET0 MOV R0,#30H MOV A,36H MOV LONG,A MOV A,30H JB ACC.6,SET0 JB ACC.5,SET0 ANL A,#0E0H CJNE A,#80H,SET2 SJMP SETO SET2: CJNE A,#00H,ERET SETO: MOV A,31H MOV QST,A CJNE A,#00H,SET3 LJMP STAT SET3: CJNE A,#01H,SET4 LJMP FEAT SET4: CJNE A,#05H,SET5 LJMP ADDR SET5: CJNE A,#06H,SET6 LJMP DESC SET6: CJNE A,#08H,SET7 LJMP GCONF SET7: CJNE A,#09H,SET8 LJMP SCONF SET8: CJNE A,#0AH,ERET LJMP INTE SET0: RET

STAT: MOV @R0,#0 INC R0 MOV @R0,#0 CALL UPEP0 SJMP SET0

ERET: MOV A,#19H CALL WRC MOV A,#0FH CALL WRD RET

FEAT: MOV A,30H ANL A,#1FH CJNE A,#02H,ERET MOV A,34H CJNE A,#82H,FE1 MOV A,#1DH CALL WRC MOV A,#8EH CALL WRD CALL INEP0 SJMP FE0 FE1: CJNE A,#2,FE2 MOV A,#1CH CALL WRC MOV A,#80H CALL WRD CALL INEP0 SJMP FE0 FE2: CJNE A,#81H,FE3 MOV A,#18H CALL WRC MOV A,#8EH CALL WRD CALL INEP0 SJMP FE0 FE3: CJNE A,#01,ERET MOV A,#1AH CALL WRC MOV A,#80H CALL WRD CALL INEP0 FE0: LJMP SET0

ADDR: MOV A,32H MOV ADR,A CALL INEP0 SJMP SET0 DESC: MOV A,33H CJNE A,#1,DE1 MOV A,#0 MOV TAB,A CALL UPDES SJMP DE0 DE1: CJNE A,#2,DE2 MOV A,#18 MOV TAB,A CALL UPDES SJMP DE0 DE2: CJNE A,#22H,DE3 MOV A,#52 MOV TAB,A CALL UPDES SJMP DE0 DE3: LJMP ERET DE0: LJMP SET0 GCONF:MOV @R1,#1 JB FLAG,GC1 MOV @R1,#00 GC1: CALL UPEP0 LJMP SET0 SCONF:MOV A,32H CLR FLAG JZ SC1 SETB FLAG SC1: CALL INEP0 LJMP SET0 INTE: MOV @R1,#01H CALL UPEP0 LJMP SET0 UPEP0:MOV A,LONG MOV R5,#8 CLR C SUBB A,R5 MOV R5,LONG JC UP1 MOV LONG,A MOV R5,#8 UP1: MOV R0,#30H MOV A,#29H CALL WRC MOV A,R5 CALL WRD UP2: MOV A,@R0 CALL WRD INC R0 DJNZ R5,UP2 RET UPDES:MOV R0,#30H MOV R5,#8 MOV DPTR,#TAB1 UP3: MOV A,TAB MOVC A,@A+DPTR MOV @R0,A INC TAB INC R0 DJNZ R5,UP3 CALL UPEP0 RET INEP0:MOV A,#29H CALL WRC MOV A,#0 CALL WRD RET

WRC:CLR CS SETB A0 MOV DAT,A CPL WRT CPL WRT SETB CS MOV P1,#0FFH RET

WRD:CLR CS CLR A0 MOV DAT,A CPL WRT CPL WRT SETB CS MOV P1,#0FFH RET

RDD:CLR CS CLR A0 CPL RED MOV A,DAT CPL RED SETB CS RET

RDI:MOV A,#22H CALL WRC CALL RDD ANL A,#0FH RET

ULOCK:MOV A,#23H CALL WRC RET

RDU: MOV A,#28H CALL WRC CALL RDD RET

WRK:PUSH ACC MOV R0,#8 MOV R1,#30H WK1:MOV @R1,#0 INC R1 DJNZ R0,WK1 MOV 32H,KEY MOV R0,#8 MOV R1,#30H MOV A,#2AH CALL WRC MOV A,#8 CALL WRD WK2:MOV A,@R1 CALL WRD INC R1 DJNZ R0,WK2 POP ACC RET

LED:SETB P0.7 MOV NUM,#10 LD1:CPL P0.7 CALL DELAY DJNZ NUM,LD1 SETB P0.7 RET

DELY: MOV R3,#15 DJNZ R3,$ RET DELAY:MOV R2,#1 DL0: MOV R6,#200 DL1: MOV R7,#126 DJNZ R7,$ DJNZ R6,DL1 DJNZ R2,DL0 RET

TAB1:DB 12H,01H,10H,01H,00H,00H,00H,08H,3CH DB 41H,03H,20H,00H,02H,01H,02H,00H,01H TAB2:DB 09H,02H,22H,00H,01H,01H,04H,0A0H,23H,09H DB 04H,00H,00H,01H,03H,01H,01H,05H,09H,21H DB 10H,01H,00H,01H,22H,41H,00H,07H,05H,81H DB 03H,08H,00H,18H TAB3:DB 05H,01H,09H,06H,0A1H,01H,05H,07H,19H,0E0H DB 29H,0E7H,15H,00H,25H,01H,75H,01H,95H,08H DB 81H,02H,95H,01H,75H,08H,81H,01H,95H,03H DB 75H,01H,05H,08H,19H,01H,29H,03H,91H,02H DB 95H,01H,75H,05H,91H,01H,95H,06H,75H,08H DB 15H,00H,26H,0FFH,00H,05H,07H,19H,00H,2AH DB 0FFH,00H,81H,00H,0C0H END

这个汇编程序我们只能看到枚举那部分,建议你把哪个型号红外头接到计算机上面去抓取数据,还有你需要实现什么功能?


我需要把红外头接收的信号解码 然后通过375 的外置固件模式传给电脑


那也就是说你拿我没的CH375芯片做设备和计算机进行通信时,如果说是外置固件的程序的话,你可以去下载CH372EVT.ZIP,在这个压缩包里面有一个XFIRM的文件夹,这个文件夹里面是外置固件的例子程序,你可以拿这个进行参考,然后拿这个汇编作为编程流程。


只有登录才能回复,可以选择微信账号登录