当前位置:网站首页>Simulation of infrared wireless communication based on 51 single chip microcomputer
Simulation of infrared wireless communication based on 51 single chip microcomputer
2022-04-23 17:09:00 【Xiao ~ Xiaoyan】
Catalog
Download address : be based on 51 MCU infrared wireless communication simulation
One 、 Project functions
The project is divided into master and slave , The host collects the temperature and light intensity IRLINK The infrared wireless transmitter transmits it to the slave , And in 12864 On the LCD screen .
Two 、 Simulation
temperature 83、 No brightness

temperature 65、 Have brightness
3、 ... and 、 Program
Partial procedure
#include <REG51.h>
#include <intrins.h>
#include "hongwaifashe.h"
void hongwaifashe(void)
{
TMOD = 0x01; //T0 16 Bit working mode
IR=1; // The transmitting port is normally at high level
ZZ(setdata[0]);
ZZ(setdata[1]);
}
void ZZ(uchar x)
{
TT0(1,m9); // High level 9mS
TT0(0,m4_5); // Low level 4.5mS
/*┈ send out 4 The frame data ┈*/
Z0(SBM);
Z0(~SBM);
Z0(x);
Z0(~x);
/*┈┈ End code ┈┈*/
TT0(1,m_56);
TT0(0,m40);
}/*┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
The functionality : Single frame sending program
Entrance parameters :1 The frame data
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈*/
void Z0(uchar temp)
{
uchar v;
for (v=0;v<8;v++) // loop 8 Secondary shift
{
TT0(1,m_56); // High level 0.65mS
if(temp&0x01) TT0(0,m1_68); // Send the lowest bit
else TT0(0,m_56);
temp >>= 1; // Moves to the right one
}
}
/*┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
The functionality :38KHz Pulse emission + Delay program
Entrance parameters :( Whether to transmit pulse , Delay time x (uS))
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈*/
void TT0(bit BT,uint x)
{
TH0 = x>>8; // Input T0 Initial value
TL0 = x;
TF0=0; // clear 0
TR0=1; // Start timer 0
if(BT == 0) while(!TF0); //BT=0 When not fired 38KHz The pulse only delays ;BT=1 launch 38KHz Pulse and delay ;
else while(1) //38KHz pulse , Duty cycle 5:26
{
IR = 0;
if(TF0)break;
if(TF0)break;
IR = 1;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
if(TF0)break;
}
TR0=0; // off timer 0
TF0=0; // Clear if the flag bit overflows 0
IR =1; // After the pulse stops , The transmitting port is normally at high level
}
版权声明
本文为[Xiao ~ Xiaoyan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231707173345.html
边栏推荐
- Lock锁
- Baidu Map Case - Zoom component, map scale component
- Aiot industrial technology panoramic structure - Digital Architecture Design (8)
- Redis docker installation
- oracle 中快速获取表的列名列表
- Shortcut keys (multiline)
- Some problems encountered in recent programming 2021 / 9 / 8
- org. apache. parquet. schema. InvalidSchemaException: A group type can not be empty. Parquet does not su
- Signalr can actively send data from the server to the client
- Bytevcharts visual chart library, I have everything you want
猜你喜欢

Lock lock

线性代数感悟之2
![[registration] tf54: engineer growth map and excellent R & D organization building](/img/12/7aece45fbc9643c97cdda94b405118.jpg)
[registration] tf54: engineer growth map and excellent R & D organization building

TypeError: set_ figure_ params() got an unexpected keyword argument ‘figsize‘

How much do you know about the process of the interview

Smart doc + Torna generate interface document

Idea of batch manufacturing test data, with source code

Derivation of Σ GL perspective projection matrix

Nodejs installation and environment configuration
![Customize my_ Strcpy and library strcpy [analog implementation of string related functions]](/img/71/a6a0c7b0e652d2b807f259f7cbf139.png)
Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
随机推荐
Shell-cut命令的使用
On lambda powertools typescript
Bottom processing of stack memory in browser
Nacos + aspnetcore + Ocelot actual combat code
Nifi fast installation and file synchronization
Milvus 2.0 质量保障系统详解
About stream flow, write it down briefly------
1-4 configuration executable script of nodejs installation
Solution architect's small bag - 5 types of architecture diagrams
Nodejs installation and environment configuration
freeCodeCamp----shape_ Calculator exercise
Idea of batch manufacturing test data, with source code
Variable length parameter__ VA_ ARGS__ Macro definitions for and logging
Summary of common websites
Further study of data visualization
[registration] tf54: engineer growth map and excellent R & D organization building
Paging SQL
Multithreaded @ async thread pool
Baidu Map Case - modify map style
Log4j output log information to file