用c语言设计程序设计查表温度传感器,基于c语言的时钟日历和温度传感器设计本科生毕业论文(设计).doc...

摘 要

本设计应用AT89S52芯片作为核心,采用C语言进行编程,实现以下功能:小时、分、秒、年、月、日、星期的显示和实时温度检测。该设计的电子时钟系统由时钟电路、LCD显示电路、按键调整电路和温度检测电路四部分组成。使用时钟芯片DS1302完成时钟日期的功能,以LCD1602为显示器,同时利用温度传感器DS18B20测量周围环境温度,并且可以依靠按键随时对日期时间进行调整。我们共设计四个按键,一个模式键,也就是我们用来选定被修改的数字的,两个调整键,一个“加”键和一个“减”键,当按下模式键,选定要调整的数字的时候,“加”、“减”可以帮我们调到所需的状态,还有一个复位键,显示精度为1秒。设计还提供三位实时温度检测并显示,其显示精度为0.1℃。关键词:AT89S52;时钟日历芯片DS1302;温度传感器DS18B20

Abstract

The design is applied with AT89S52 chip as the core, use C program language, to achieve the following functions: hours, minutes, seconds, and the year, month, date display, real-time temperature sensing. The design of electronic clock contains electronic clock circuit, LCD display circuit, buttons and temperature detection circuit adjustment circuit four parts. Use the clock date clock chip DS1302 completed features to display by LCD1602, while using the temperature sensor DS18B20 measuring ambient temperature, and rely on keys to adjust at, date, time at any time. We have designed four buttons, one mode key, this key help we chose the number that are need to modify, and two adjustment key, one plus key, one minus key. After press the mode button, select the time to be adjusted, add or sub the number to the desired state, there is a certain key, press the OK button to enter the normal clock mode after adjusted. This design provides both temperature sensing and display real-time.

Key words:AT89S52;Clendar Clock Chip DS1302;Temperature sensor DS18B20

目 录

第1章 概述1

1.1 单片机的定义和特点1

1.2 单片机的发展现状和发展趋势2

1.3 编程语言的选择3

第2章 基于单片机的电子时钟硬件设计5

2.1 MCU的选择与AT89S52简介5

2.2 时钟电路的设计8

2.3 环境温度采集电路的设计12

2.4 显示电路的设计16

2.5 按键电路的设计17

2.6 复位电路的设计18

2.7 本章小结19

第3章 基于单片机的电子时钟软件设计20

3.1 主程序设计20

3.2 实时时钟日历子程序设计20

3.3 本章小结23

第4章 系统调试24

4.1 单片机基础电路与显示电路的调试24

4.2 DS1302电路的调试24

4.3 环境温度采集电路与按键电路的调试25

4.4 硬件调试结果25

4.5 本章小结26

结论27

参考文献28

致 谢30

附录1 总设计原理图、PCB图31

附录2 程序32

第1章 概述

目前单片机渗透到了我们生活的各个领域,几乎很难找到哪个领域没有单片机的踪迹。导弹的导航装置,飞机上各种仪表的控制,计算机的网络通讯与数据传输,工业自动化过程的实时控制和数据处理,广泛使用的各种智能IC卡,民用豪华轿车的安全保障系统,录像机、摄像机、全自动洗衣机

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值