基于單片機的點陣式時鐘電子顯示屏設計與實現(xiàn).doc
基于單片機的點陣式時鐘電子顯示屏設計與實現(xiàn),摘要:電子時鐘,它最大的特點在于走時精確和功能的多樣化,為我們帶來了極大的方便。而led點陣式顯示屏,具有亮度高、功耗小、壽命長等優(yōu)點。若以led點陣來作為電子時鐘的顯示屏,則可實現(xiàn)遠距離、大視角的時鐘顯示。從而非常適合于在公共場所中顯示時間。本設計的重點在于對點陣式顯示屏的顯...


內(nèi)容介紹
此文檔由會員 lanxin520 發(fā)布基于單片機的點陣式時鐘電子顯示屏設計與實現(xiàn)
摘要:電子時鐘,它最大的特點在于走時精確和功能的多樣化,為我們帶來了極大的方便。而LED點陣式顯示屏,具有亮度高、功耗小、壽命長等優(yōu)點。若以LED點陣來作為電子時鐘的顯示屏,則可實現(xiàn)遠距離、大視角的時鐘顯示。從而非常適合于在公共場所中顯示時間。
本設計的重點在于對點陣式顯示屏的顯示研究。從宏觀上來上,顯示屏可分為兩個部份:顯示器件和微控制器。由微控制器控制顯示器件的亮滅、顏色變化,從而組合出所需要的圖相。在此次設計中,采用了16 x 64 個單色LED作為顯示器件,用Mega8作為微控制器,以靜止和左移的方式進行時鐘顯示。由于充分考慮了軟硬件的易擴充性,用本設計的構架思想可很方便地進行點陣擴充和多個漢字或圖形的顯示。
設計中所涉及的知識點主要有:點陣顯示原理,字模提取,顯示左移算法的實現(xiàn),單片機Meg8和編譯器IAR的使用。以及在軟硬件設計調(diào)試過程中的各種現(xiàn)象及解決方案。
關鍵詞: 電子時鐘;點陣顯示原理; 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 單片機的發(fā)展歷史..........................................................................................4
2.2 單片機的發(fā)展趨勢..........................................................................................5
2.3 單片機的特點..................................................................................................8
2.4 單片機的應用..................................................................................................9
2.5 單片機的基本系統(tǒng)結構..................................................................................10
第3章 硬件設計...........................................................................................................11
3.1 硬件部分總體框架..........................................................................................11
3. 2 單片機Mega8簡介.........................................................................................11
3. 2. 1 AVR Mega8的主要性能參數(shù)..........................................................11
3.2.2 Mega8引腳說明...............................................................................12
3. 2. 3 Mega8最小系統(tǒng)電路計...................................................................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點陣的數(shù)字字模提取..............................................................17
3. 5 16*64LED點陣的結構及顯示原理...............................................................18
3. 6 16*64 LED點陣驅(qū)動原理..............................................................................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 正常/調(diào)分/調(diào)時顯示程序..................................................................28
4. 2. 6 調(diào)速顯示、左移顯示程序................................................................30
4. 2. 7 時間處理程序....................................................................................35
第5章 調(diào)試過程及相關問題的處理............................................................................37
5.1 開發(fā)工具.........................................................................................................37
5.1.1 IAR集成開發(fā)環(huán)境 ...........................................................................37
5.1.2 AVR_fighter編程下載軟件和下載器的制作.................................41
5.1.3 Protenus單片機仿真軟件................................................................42
5.2 調(diào)試步驟.........................................................................................................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