-
犯错
红外解码程序主要工作为等待红外线信号出现,并跳过引导信号,开始收集连续32位的表面数据,存入内存的连续空间。位信号解码的原则是:以判断各个位的波宽信号来决定高低信号。位解码原理如下:
解码为0:低电平的宽度0.56ms+高电平的宽度0.56ms。
解码为1:低电平的宽度1.68ms+高电平的宽度0.56ms。
程序中必须设计一精确的0.1ms延时时间作为基础时间,以计数实际的波形宽度,若读值为5表示波形宽度为0.5ms,若读值为16表示波形宽度为1.6ms,以此类推。高电平的宽度1.12ms为固定,因此可以直接判断低电平的宽度的计数值5或时16,来确定编码为0或是1。程序中可以减法指令SUBB来完成判断,指令“SUBB A,R2”中若R2为计数值,A寄存器设为8,就可如下:
当“8-R2”有产生借位,借位标志C=1,表示编码为1。
当“8-R2”无产生借位,借位标志C=0,表示编码为0。
将借位标志C经过右移指令“RRC A”转入A寄存器中,再经由R0寄存器间接寻址存入内存中。
-err
- 2022-08-22 12:44:29下载
- 积分:1
-
时针芯片DS12C887a的C51底层程序
时针芯片DS12C887a的C51底层程序-hand of a clock chip DS12C887a the bottom procedures C51
- 2022-04-28 15:02:14下载
- 积分:1
-
This procedure for cstn_lcd LCD driver, the current market, many are CSTN color...
此程序为cstn_lcd液晶驱动,目前市面上的许多彩屏手机都是CSTN-This procedure for cstn_lcd LCD driver, the current market, many are CSTN color screen mobile phone
- 2022-05-20 07:25:45下载
- 积分:1
-
16进制转压缩型BCD码的C语言实现
16进制转压缩型BCD码的C语言实现-16 hexadecimal to BCD code compression realize the C language
- 2023-06-13 11:55:03下载
- 积分:1
-
红外遥控接收
ORG 0000H
LJMP START 转入主程序
ORG 0010H
START:
MAIN:
JNB P2...
红外遥控接收
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
- 2022-07-21 10:12:11下载
- 积分:1
-
AVR 简介,介绍AVR单片机的原理,应用及编程过程。
AVR 简介,介绍AVR单片机的原理,应用及编程过程。-AVR description
- 2023-05-26 13:45:03下载
- 积分:1
-
61单片机模拟8080总线时序的程序,很多接口芯片的时序就是这个...
61单片机模拟8080总线时序的程序,很多接口芯片的时序就是这个-61 Microcontroller Bus Timing simulation of 8080 programs, many interface chip timing is this
- 2022-05-06 08:12:24下载
- 积分:1
-
一个使用C51编写的视频切换器的控制程序,用于16选4的视频切换...
一个使用C51编写的视频切换器的控制程序,用于16选4的视频切换-use C51 to prepare a video switcher control procedures for the April 16 elections Video Switch
- 2022-01-23 10:39:45下载
- 积分:1
-
pid procedures AN964.zip note to explain the procedures in process
pid程序AN964.zip的说明文件,讲解程序运行流程-pid procedures AN964.zip note to explain the procedures in process
- 2022-03-18 22:03:59下载
- 积分:1
-
模块化c语言实现模拟I2C读写EPROM 程序
模块化c语言实现模拟I2C读写EPROM 程序-C language for analog modular I2C read and write EPROM program
- 2022-04-11 19:32:28下载
- 积分:1