基于单片机的点阵式时钟电子显示屏设计与实现.doc

约60页DOC格式手机打开展开

基于单片机的点阵式时钟电子显示屏设计与实现,摘要:电子时钟,它最大的特点在于走时精确和功能的多样化,为我们带来了极大的方便。而led点阵式显示屏,具有亮度高、功耗小、寿命长等优点。若以led点阵来作为电子时钟的显示屏,则可实现远距离、大视角的时钟显示。从而非常适合于在公共场所中显示时间。本设计的重点在于对点阵式显示屏的显...
编号:30-194698大小:2.05M
分类: 论文>通信/电子论文

内容介绍

此文档由会员 lanxin520 发布

基于单片机的点阵式时钟电子显示屏设计与实现


摘要:电子时钟,它最大的特点在于走时精确和功能的多样化,为我们带来了极大的方便。而LED点阵式显示屏,具有亮度高、功耗小、寿命长等优点。若以LED点阵来作为电子时钟的显示屏,则可实现远距离、大视角的时钟显示。从而非常适合于在公共场所中显示时间。
本设计的重点在于对点阵式显示屏的显示研究。从宏观上来上,显示屏可分为两个部份:显示器件和微控制器。由微控制器控制显示器件的亮灭、颜色变化,从而组合出所需要的图相。在此次设计中,采用了16 x 64 个单色LED作为显示器件,用Mega8作为微控制器,以静止和左移的方式进行时钟显示。由于充分考虑了软硬件的易扩充性,用本设计的构架思想可很方便地进行点阵扩充和多个汉字或图形的显示。
设计中所涉及的知识点主要有:点阵显示原理,字模提取,显示左移算法的实现,单片机Meg8和编译器IAR的使用。以及在软硬件设计调试过程中的各种现象及解决方案。

关键词: 电子时钟;点阵显示原理; LED点阵;单片机; Mega8;IAR;74HC154;74HC595;

 

 

 


Design and Implementation of Dot-matrix Clock
Display Screen
Abstract: Electronic clock system, which features that time is very accurate and function are diversity, brought us great convenience.otherwise,The LED dot matrix have advantage of high brightness, low power consumption, long lifetime etc. If use LED dot matrix as screen to display electronic clock, can achieve long-range, large angle of the clock display effect.Thus very suitable to display the time in public places.
    This design focuses on the display of dot matrix .Look from the macro, the design can be divided into two parts: the screen part and microcontroller part. The micro-controller control the Leds off and on. In this design, using  16 x 64 monochrome LED as the display screen, using Mega8 as micro-controller,We can get an effect of static display and left-move display.As full consideration to the ease Expansion of hardware and software , the framework of ideas can be easily expanded to dispaly a large number of Chinese characters or expanded to more dot-matrix Led screen
    The knowledge involved in this design are: dot matrix display principle, font data extraction, left-move showe algorithm, Meg8 and the use of IAR compiler.And the solutions to problem Encountered in the process of debugging software and hardware.
Keywords: electronic clock; dot matrix display principle; LED dot matrix; SCM; Mega8; IAR; 74HC154; 74HC595;

 


 
目    录
摘要
Abstract  
引 言...............................................................................................................................1
第1章  设计要求与总体方案.....................................................................................2
1.1 设计要求..........................................................................................................2
1.2 设计目的..........................................................................................................2
1.3 总体思路..........................................................................................................2
1.4 方案..................................................................................................................2
第2章 单片机的相关介绍...........................................................................................4
2.1 单片机的发展历史..........................................................................................4
2.2 单片机的发展趋势..........................................................................................5
2.3 单片机的特点..................................................................................................8
2.4 单片机的应用..................................................................................................9
2.5 单片机的基本系统结构..................................................................................10
第3章 硬件设计...........................................................................................................11
3.1 硬件部分总体框架..........................................................................................11
3. 2 单片机Mega8简介.........................................................................................11
        3. 2. 1  AVR Mega8的主要性能参数..........................................................11
        3.2.2  Mega8引脚说明...............................................................................12
        3. 2. 3  Mega8最小系统电路计...................................................................14
3.3 其它芯片简介..................................................................................................15
 3. 3. 1  74HC595简介....................................................................................15
 3. 3. 2  74HC154简介....................................................................................16
3. 4  汉字字模提取................................................................................................16
        3. 4. 1  16*16点阵汉字的字模提取............................................................16
        3. 4. 2  16*8点阵的数字字模提取..............................................................17
   3. 5  16*64LED点阵的结构及显示原理...............................................................18
   3. 6  16*64 LED点阵驱动原理..............................................................................19
第4章 软件设计............................................................................................................20
    4.1 编程语言选择................................................................................................20
    4. 2  程序设计与流程图........................................................................................20
4.2.1  主程序.................................................................................................20
4.2.2  中断处理程序.....................................................................................21
4.2.3  按键读取程序.....................................................................................23
4.3.4  按键处理程序.....................................................................................26
        4. 2. 5  正常/调分/调时显示程序..................................................................28
        4. 2. 6  调速显示、左移显示程序................................................................30
        4. 2. 7  时间处理程序....................................................................................35
第5章 调试过程及相关问题的处理............................................................................37
 5.1 开发工具.........................................................................................................37
 5.1.1 IAR集成开发环境 ...........................................................................37
 5.1.2 AVR_fighter编程下载软件和下载器的制作.................................41
 5.1.3 Protenus单片机仿真软件................................................................42
 5.2 调试步骤.........................................................................................................44
 5.2.1 Proteus硬件电路图绘制..................................................................44
 5.2.2 IAR avr程序设计流程......................................................................45
 5.2.3 观察仿真结果.....................................................................................45
第6章 PCB设计.............................................................................................................49
     6. 1  Protel99 设计PCB的一般流程.................................................................49
     6. 2  PCB相关设计图..........................................................................................49
         6. 2. 1  PCB原理图......................................................................................50
         6. 2. 2  PCB图..............................................................................................51
         6. 2. 3  PCB 3D图........................................................................................52      
小结...................................................................................................................................53
致谢...................................................................................................................................54
参考文献............................................................................................................................55