如何用PIC做红外线遥控接收(国外英文资料).docVIP

  • 3
  • 0
  • 约1.87万字
  • 约 26页
  • 2017-06-05 发布于河南
  • 举报

如何用PIC做红外线遥控接收(国外英文资料).doc

如何用PIC做红外线遥控接收(国外英文资料)

如何用PIC做红外线遥控接收 How to do infrared remote reception with PIC There are three ways in which infrared reception is currently used Query method, the software continuously queries whether to be low (remote signal) and then read the head code with precision delay Data 0 or 1 yards. When you read the signal input, open the timer counter, and then read the number of interrupts to determine the head code and 0, 1. 3 RB0 or rb4-rb7 + timer (or software delay) using input interrupts is the benefit of real-time control. As follows: ; * * * launches at 6221, and the received code value is sent to the PORTC port of ICD * * * * * ; * * * * * * * * * * * Org 0000 h The nop Goto start Org 0004 h Goto serv ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * start BSF status, rp0; Volume 1 Movlw 0000 h Movwf trisc; C output Movlw 0ffh; RB0 input port B Movwf trisb Movlw B For 4 Movwf option_reg; Timer TMR0 BCF status, rp0; Body 0 CLRF intcon;BSF intcon, 7; Open INT drops along the interrupt BSF intcon, 4 BCF intcon 1 CLRF portc loop sleep The nop Goto loop ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * serv Movwf w_temp Swapf status, 0 CLRF status Movwf status_temp Movf pclath, 0 Movwf pclath_temp CLRF pclath ; * * * * * * * * * * * * * * * remote control processing. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * BCF intcon, 1 BTFSC portb, 0; Check if RB0 is 0. Goto ZDHH; The RB0 is not 0, it is interrupted Call delay8; Invoke 8MS latency. Header code detection. BTFSC portb, 0; Testing head code Goto ZDHH; Not interrupt Call delay5; Data detection after delay of 5MS. BTFSS portb, 0; Check whether RB0 is high level. Goto ZDHH; Its not a continuous test. ; , * * * * * * * * * * * CLRF data1; 20 h CLRF data2; 21 h. CLRF data3; 22 h. CLRF

文档评论(0)

1亿VIP精品文档

相关文档