|
movwf pclath_temp clrf pclath ;***************遙控處理.******************************
bcf intcon,1 btfsc portb,0 ;檢測RB0是否為0. goto zdhh ;RB0不為0,誤中斷.反回 call delay8 ;調用8MS延時.頭碼檢測. btfsc portb,0 ;檢測頭碼 goto zdhh ;不是中斷反回 call delay5 ;延時5MS后進行數(shù)據(jù)檢測. btfss portb,0 ;檢測RB0是否為高電平. goto zdhh ;不是繼續(xù)檢測. ;********************************************* clrf data1 ;20H clrf data2 ;21H clrf data3 ;22H clrf data4 ;24H clrf jsp2 ;32位計數(shù)器 clrf sj ;接收的數(shù)據(jù)寄存器 clrf jsp1 ;8位計數(shù)器 movlw 0x20 ;20H寄存器送W movwf fsr ;由W送20H到FSR
|