资 源 简 介
红外遥控接收
ORG 0000H
LJMP START 转入主程序
ORG 0010H
START:
MAIN:
JNB P2.2,IR
LJMP MAIN
以下为进入P3.2脚外部中断子程序,也就是解码程序
IR:
MOV R6,#9
SB:
ACALL DELAY882 调用882微秒延时子程序
JB P2.2,EXIT 延时882微秒后判断P3.2脚是否出现高电平如果有就退出解码程序
DJNZ R6, SB 重复10次,目的是检测在8820微秒内如果出现高电-infrared remote control receiver ORG 0000H LJMP START into main program ORG 0010H START : MAIN : JNB P2.2, IR LJMP MAIN below to enter P3.2 foot external interrupt subroutine, which is decoding procedures IR : MOV R6, SB# 9 : Calling ACALL DELAY882 882 microsecond delay subroutine JB P2.2, EXIT 882 microsecond delay after the judgment whether there P3.2 feet to I quit if decoding procedures DJNZ R6, SB repeated 10 times, the purpose is to test if within 8,820 microsecond high