1、 I 基于 485 通信的网络系统研究与设计 摘要 基于 51 单片机的 485 网络系统的算法研究,通过 485 总线组成远距离数据采集控制 系统。 在分析了不同类型的单片机的特点及单片机与单片机机通信技术的基础上, 设计了 单片机控制的采集系统, 并通过串口通信实现单片机与主机之间的通信, 实现数据的传送 并将数据在主机上显示及存储, 完成单机的多通道数据采集系统的设计及实现。 通信包括 一个主机和两个从机,主机完成报警门限设置及 1602LCD 的显示,2 个从机分别从测量环 境温度、湿度。一个主机和两个从机的软件模块的算法分析。温度 DS18B20 传感器,湿度 传感器 HS1101,
2、分别采集数据通过 485 总线传输到由 51 单片机做的主机,主机判断是否 超过门限设置,如果超过门限设置就报警。整个网络同步运行。设置主机和从机之间的通 讯协议, 以便整个网络更好的构成一个独立框架不受其它信号的干扰。 提高整个网络软硬 件方面的可靠性。 关键词: 485 总线 数据采集 通信协议 II Communications network system research and design based on the 485 Abstract 485 network system of the Algorithm and the research based on the 51SC
3、M. On the analysis of the different types of single chip microcomputer and the characteristics of the single chip microcomputer and PC communications technology, and on the basis of the design of the single chip computer control acquisition system, and through the realizes serial communication of co
4、mmunication between the microcontroller and host, realize the data to the data transmission in host display and storage, complete the single multi-channel data acquisition system design and implementation. Communication include a host and two from machine, the host complete alarm threshold set and 1
5、602 LCD display, 2 from machine respectively from the measurement environment temperature, humidity. A host and two from machine software module algorithm analysis. Temperature sensor DS18B20, humidity sensors HS1101, collect data through the 485 bus respectively by 51 SCM transmissions to the host,
6、 the host determine whether more than threshold set, if more than threshold set to report to the police. The whole network synchronization operation. Set the host and the communication protocol between from machine, so that the whole network better constitute an independent frame from interference from other signals. Improve the whole network of hardware and software reliability. Keywords:485 bus; Data acquisition ; Protocols Communication III 目录 第一章 绪论 1 1.1 课题研究背景概述 . 1 1.2 课题研究的意义 .