1、 摘 要 红外无线数据传输系统是一种利用红外线作为传输媒介的无线数据传输方 式,它相对于无线电数据通信具有功耗低、价格便宜、低电磁干扰、高保密性等 优点,目前发展迅猛,尤其是在近距离无线数据通信中得到广泛的运用。 本文主要介绍基于 51 单片机的红外无线数据传输系统的原理。在硬件设计原 理的介绍中,主要分析了系统中 NE555 数据调制电路、红外发射电路、红外接收 电路、DS18B20 温度传感器电路、单片机外围电路以及声光报警电路。在系统软件 设计的介绍中,我们主要分析单片机串口通信协议、控制温度传感器采集数据、 对数据的编解码;而液晶显示部分软件则是为了具有更好的人机交互界面。 通过调试后
2、,本系统基本达到预期要求,1、正确实现双机通信功能,在 2400 波特率下通信距离达到 7 米左右;2、具有在超时通信不畅的情况下进行报警提示 功能;3、具有自动搜寻一帧数据起始位的功能,这样可以有效防止外界的干扰; 4、通过串口可以与 PC 机实现正确通信,可以作为计算机的红外无线终端,完成数 据的上传和下放。因此本系统具有广阔的实用价值。 关键词:AT89S52 单片机;数据采集;红外通信;调制解调;串口通信 Abstract Infrared wireless data transmission system is a wireless data transfer method that
3、 uses infrared as a transmission medium, Compared with the radio data communication, it has many advantages in power consumption, Production costs, electromagnetic interference, and the confidentiality. At present, this technology is developing rapidly, In particular, It is widely used in short-rang
4、e wireless data communications, In this paper, we are introduced infrared wireless data transmission systems theory that based on the single-chip microcomputer 51. In the hardware design principle introduction, We mainly analysis the systems data modulation circuit of NE555, infrared transmitter, IR
5、 receiver circuit, DS18B20 temperature sensor circuit, microcontroller peripheral circuits, as well as sound and light alarm circuit. In introducing the system software design, We mainly analysis MCU serial communication protocol, to control temperature sensor data collection, data codec; And, The s
6、oftware of the liquid crystal display is better to have the man-machine interface. Through debugging, the system achieved the expected goals, 1, the system can correct achieve double-communications functions, in 2400 baud rate, the communication distance can reach about 7 m; 2,It has alarm function in overtime communications impeded circumstances; 3, with an automatic search function of initial data, this can effectively prevent outside interference; 4, the systems and PC can communicate throu