- 3
- 0
- 约1.87万字
- 约 26页
- 2017-06-05 发布于河南
- 举报
如何用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
您可能关注的文档
- 全国计算机信息高新技巧测验(CITT)(国外英文资料).doc
- 公式组合记单词法(国外英文资料).doc
- 公文改错示例(国外英文资料).doc
- 公益类事业单位绩效考核的难点与解决途径(国外英文资料).doc
- 公益营销:本质做企业,角色做品牌(国外英文资料).doc
- 公司经验大全之一:谨防员工的“脑力”浪费和时间浪费(国外英文资料).doc
- 公积金22问----让你全面了解公积金贷款(国外英文资料).doc
- 六、什么是韵基?(国外英文资料).doc
- 八年级语文(下)期末综合题(二)(国外英文资料).doc
- 六级温习计划(国外英文资料).doc
- 2025年北京市门头沟区中考一模英语试题.docx
- 2025年北京市门头沟区中考二模英语试题.docx
- 2025年北京市丰台区中考二模英语试题.docx
- 2025年中考英语考前冲刺模拟卷 (北京专用) 解析卷.docx
- 2025年中考英语考前冲刺模拟卷 (北京专用) 原卷.docx
- 2025年肩颈按摩仪行业社媒趋势数据分析.docx
- 2025年人身险行业信用回顾与2026年展望.docx
- 合同法买卖合同培训课件.ppt
- 2025年全球食物系统与SDG研究报告-食物供给、食者健康、生态平衡的整体治理.docx
- 2025下半年四川乐山市川投峨眉铁合金(集团)有限责任公司对考前自测高频考点模拟试题最新.docx
原创力文档

文档评论(0)