文档介绍:内蒙古科技大学
本科生毕业设计毕业论文
基于USB接口的电子时钟设计
Realization of realtime clock based on USB interface
目录
前言
第一章概述
第二章硬件介绍
1、USB总线概述
2、DS12C887的特点及引脚说明
3、USB 接口芯片CH375的原理
4、串行静态显示电路原理说明
5、端对端的数据传输原理
第三章设计方案
第四章软件设计
1、计算机端软件
2、单片机端软件
第五章结论
参考文献及资料
摘要
在智能化仪器仪表中,往往需要走时准确的电子时钟为多通道数据采集、定时及实时控制提供精确的时间基准和同步信号。目前,实现实时时钟的方法主要有软件时钟(由软件计时实现) 、硬件时钟(由硬件时钟芯片实现) 、GPS 时钟(由全球卫星定位系统提供) 等。软件时钟具有硬件开销小、成本低、外围电路简单等优点。但由于时钟是靠软件延时实现的,运行过程中不仅要占用大量的CPU 时间,而且计时精度低、走时误差较大,在智能化仪器仪表中很少采用。GPS(全球卫星定位系统) 提供的实时时钟信号虽然具有相当高的精度,但由于GPS 产品成本高,在普通智能化仪器仪表中很少采用。本文介绍一种较新的实时时钟芯片DS12C887 及其与AT89C51 单片机组成的电子时钟。以单片机为核心的测控系统经常需要各种各样的通信方式实现上、下位机之间或主机与外设之间的通信。对于单片机应用系统中通信的要求是可靠性高、速度快、应用简单、连接方便。在有些特殊要求的场合还会有些特殊的要求,在本文中,我运用了南京沁恒电子有限公司出品的USB总线的通用设备接口芯片CH375,与本地端的单片机通信就如同读/写硬盘文件。考虑到目前很多新型的单片机已经集成了各种各样以往需要外扩的功能器件,本设计在选材时尽量考虑那些尚未集成到单片机中的功能器件,如LED驱动选用74LS164。
关键词:USB 电子时钟 DS12C887 CH375
In the design of some Intelligent Instrumentation, it is often a necessary to provide accurate real time clock for multi-channel data acquisition and Timing. Also, provide benchmarks and time synchronization signal for accurate real-time control is mon use . At present, the real-time clock may be realized by software-clock (time realized by software), hardware-clock (time realized by clock chip), GPS-clock (time from the global satellite positioning system) and so on. Software-clock has advantage of low cost, simple external circuit. However, as the clock is achieved by software delay, the operating process may use a lot of CPU time, and it is urate ,it is rarely used in the design of Intelligent Instrumentation. It may be accurate for GPS (global positioning system) to provide real-time clock signal, However, as the high cost of GPS product,it is rarely used in ordinary Intelligent Instrumentation. This paper presents a relatively new clock chip , DS12C887,and an electronic posed by it. In many measuring and control systems often need a variety munications means, between mainframe and MCU application systems mu