介绍利用C8051F350单片机进行数据采集和红外线通信技术,进而实现对设备进行控制的方法。论述该红外线通信系统的组成结构、硬件原理和软件流程,包括红外线通信协议、编码、解码及中断服务程序设计。该系统从节点可以高精度地采集现场的模拟量和数字量,通过主从式红外线无线网络将数据传送到主节点连接的上位机。上位机的控制命令通过红外线网络传送给从节点实现控制功能。该系统结构简单,抗电磁干扰能力强,成本低廉,便于在数据采集与控制中应用。
The paper illustrates an approach to control the equipment with C8051F350 MCU based on data acquisition and infrared communication technology. It presents the elementary structures of this infrared communication system, the principles of hardware and the software flowchart which includes the designs for infrared communication protocol, encoding, decoding and interrupt service. The slave nodes of this system can capture high-precision analog and digital value, and transmit data to the host controller which connects the master node through the master-slave infrared wireless network. Meanwhile, commands from the host controller can also be sent to controlled nodes via infrared wireless network in order to accomplish the expected control functions. In general, this system has a simple structure, anti-electromagnetic interference capability, and low cost feature qualified to work of data acquisition and control.