您好,欢迎来到佳博论文网!

I2C总线温度传感系统

论文编号:CK098论文字数:11775,页数:40

摘 要

目前比较流行的串行扩展总线中,I2C总线以其严格的规范和众多支持I2C接口的外围器件而获得了广泛应用。它适合于比较复杂单片机应用系统中元件与芯片之间的短距离通信。本文介绍了一个基于I2C总线上的温度传感器系统的设计。该设计按照I2C总线规范,并给出了利用单片机的基本I/O接口实现12C总线进行多点温度测量的方法。详细介绍了I2C总线的概念、特点,基本原理及基于12C总线的单片机系统软硬件的设计与实现。I2C总线应用系统的软硬件通过调试,并应用于科研教学中,效果相当好。其他相近的系统作适当的即可。同时又详细介绍了新型数字式温度传感器AD74l6的功能、结构和特性等。通过实践可知,AD7416测温范围宽、准确度高,相比其它数字式温度传感器有连接及编程简单的优点, 具有推广使用价值。本次设计主芯片用的是STC89C52, 利用P1.0引脚作为SCL,P3.1T引脚作为SDL。

关键词:I2C总线; STC89C52;AD7416

Abstract

Currently ,among popular serial expansion in the bus, I2C bus are widely applied because of its strict standard and so much interface peripheral devices which support the I2C bus. It is suitable for the short distance communication between components and chips in a complex microcomputer application system. This article introduces a temperature sensor system design based on the I2C bus. The design is strictly in accordance with the I2C bus specification and givens a method to realize multi-point temperature measurement by using SCM ‘s basic I/O interfaces. It is introduces the concept, characteristics, basic principle of the I2C bus, and the designs and implementations of SCM system hardware and software based on 12C bus in details. The software and hardware of I2c bus application system is applied into research and teaching fields, the results are successful, other similar system can work successfully only if be amended suitable. At the same time, it also detailed introduces the new digital functions, structures and identity numbers of temperature sensor AD74l6. Through the practice, AD7416 has advantages compared with other digital temperature sensor, it has wider range of temperature, higher accuracy, more easily connected and programming. It has value to to promote the use. The design of the main chip is STC89C52, using p1 .0 pin as SCL,using p1.1 pin as SDL.

Keywords:The I2C bus;AD7416;STC89C52目 录

摘要……………………………………………………………………………. . .…………….. I

1 前言………………………………………………………………………………………….. 1

2 总体设计方案……………………………………………………………………………. . . 3

2.1 系统总体结构…………………………………………………………………….…… 3

2.2 系统硬件结构…………………………………………………………………….... . . 4

2.3 系统总体软件流程……………………………………………………………. . .……5

3 I2C总线……………………………………………………………………………………6

3.1 I2C总线概念………………………………………………………………………….6

3.2 I2C总线的特点………………………………………………………………………6

3.3 I2C总线系统中的几个名词、术语 ……………………………………………… 6

3.4 I2C总线基本原理……………………………………………………………………7

4温度控制系统的上位机通信模块…………………………………………………………9

4.1 上位机通信系统硬件…………………………………………………………………9

5 STC89C52主片接收传递模块………………………………………………………..12

5.1温度控制系统模块…………………………………………………………………… 12

5.2 STC89C52概况………………………………………………………………………12

5.3 芯片AD7416概况……………………………………………………………………16

6 LED显示模块………………………………………………………………………………17

6.1 显示模块电路图……………………………………………………………………17

6.2 芯片74LS164 ………………………………………………………… ………… 18

6.3 芯片74LS138 ……………………………………………………………………19

6.4 LED数码管显示…………………………………………………………………20

7 系统的调试………………………………… …………………………………………...22

7.1 上位机通信模块调试 …………………………………………………………22

7.2 温度控制系统模块和显示模块调试……………………………………………23

7.3 系统的缺点和优点………………………………………………………………23

8 总结………………………………………… …………………………………………….23

9 致谢 ……………………………………………………………………………………...25

10 附录 ……………………………………………………………………………………...29

I2C总线温度传感系统......