2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩9頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、<p>  基于AT89C51單片機(jī)的LED顯示控制系統(tǒng) </p><p><b>  摘 要 </b></p><p>  本次設(shè)計(jì)完成基于AT89C52單片機(jī)的LED顯示控制系統(tǒng)軟硬件的設(shè)計(jì)。我們用一個(gè)簡單的外部電路控制尺寸為32*192的顯示屏,通過一個(gè)動(dòng)態(tài)顯示模塊,這個(gè)顯示屏也能顯示六個(gè)32*32的漢字,也能分成兩個(gè)小的顯示屏,能夠顯示24

2、個(gè)16*16的漢字。我們能通過修改程序來改變顯示內(nèi)容。字幕可以實(shí)現(xiàn)滾動(dòng)功能且滾動(dòng)速度可以根據(jù)要求調(diào)節(jié),屏幕也具有暫停功能。漢字代碼儲(chǔ)存在數(shù)據(jù)存儲(chǔ)器中,儲(chǔ)存器的容量可以根據(jù)顯示漢字的需要擴(kuò)展。該顯示屏具有低電壓,硬件電路簡單等優(yōu)點(diǎn)。</p><p>  關(guān)鍵字 LED/漢字/AT89C52</p><p><b>  1 簡 介</b></p><

3、p>  LED顯示屏已成為一個(gè)重要的標(biāo)志,在城市照明、現(xiàn)代化、信息社會(huì)不斷的改善和美化人們的生活環(huán)境。LED燈可以應(yīng)用于大型購物商場、車站、碼頭、地下車站,各種管理窗口等等。LED產(chǎn)業(yè)已成為一個(gè)快速增長的新興產(chǎn)業(yè),具有巨大的市場空間和前景。一些元器件的顯示裝置的模構(gòu)通常是由顯示模塊、控制系統(tǒng)和電力系統(tǒng)。顯示模塊構(gòu)成的網(wǎng)格結(jié)構(gòu)由領(lǐng)導(dǎo),并負(fù)責(zé)發(fā)光顯示;屏幕上可以顯示文本,圖片、視頻等,在相應(yīng)的區(qū)域控制系統(tǒng)操控LED光亮或黑暗;電力系統(tǒng)

4、是一個(gè)負(fù)責(zé)屏幕上轉(zhuǎn)換輸入電壓和電流流進(jìn)的電壓和電流。LED點(diǎn)陣顯示提取顯示字符的字體通過PC,通過單片機(jī),然后顯示在點(diǎn)陣屏,主要用于室內(nèi)和室外的顯示。LED點(diǎn)陣顯示可分為圖形顯示,圖像顯示和視頻顯示器顯示。相比提高了圖像顯示的特點(diǎn)圖形,無論它是在這兩種顏色單色或彩色顯示。因此,圖形顯示不僅反映豐富的顏色,而且錄像顯示清晰、彩色圖像,也表現(xiàn)在電視和電腦的信號(hào)。雖然三者之間有一些差異,但是最基本的原則是類似。</p><

5、p>  2 系統(tǒng)整體結(jié)構(gòu)設(shè)計(jì)</p><p>  單片機(jī)(SCM)模型選擇相應(yīng)的目標(biāo)、功能、可靠性、成本,精度和速度控制系統(tǒng)。根據(jù)這個(gè)主題的實(shí)際情況,選擇不同的配置管理模型主要考慮從以下兩個(gè)方面:第一,供應(yīng)鏈管理具有較強(qiáng)的抗干擾能力;第二,單片機(jī)具有較高的性價(jià)比。mcs51匯編語言是由于廣泛應(yīng)用在中國,有更多的需求,還可以配合外圍芯片。ATMEL公司,引進(jìn)了一種新的一代單片機(jī),即89系列,并通過對(duì)典型的產(chǎn)品

6、測(cè)試具有較高的性能和較低的成本。AT89C52是一種低電壓、高性能CMOS 8位單片機(jī),包括了8 k只讀芯片程序內(nèi)存(PEROM)可以重復(fù)刪除,256字節(jié)隨機(jī)的存取數(shù)據(jù)存儲(chǔ)器(RAM),裝置采用高密度非易失性存儲(chǔ)器存儲(chǔ)技術(shù)。8052年產(chǎn)品,而芯片內(nèi)置的通用8位元中央處理器(CPU)、Flash存儲(chǔ)單元,可以應(yīng)用到更復(fù)雜的控制系統(tǒng)中。</p><p>  該系統(tǒng)實(shí)現(xiàn)要求的電路是由AT89C52芯片、時(shí)鐘電路、復(fù)位電

7、路,列掃描驅(qū)動(dòng)電路、行線驅(qū)動(dòng)電路和6個(gè)32×32 LED點(diǎn)陣。顯示單位由兩個(gè)74 HC154輸入點(diǎn)陣數(shù)據(jù)。串行數(shù)據(jù)信號(hào)分為兩個(gè)部分,分別給兩個(gè)8255,8255的數(shù)據(jù)來自AT89C52主控制器。掃描信號(hào)的每個(gè)字是由這兩個(gè)74 HC154,分為6組來輸入。信號(hào)是由74 HC154,AT89C52的P1.0 ~ P1.3, 外部數(shù)據(jù)存儲(chǔ)器6264與AT89C52共同來控制數(shù)據(jù)輸入。</p><p>  3

8、系統(tǒng)的硬件電路設(shè)計(jì)</p><p>  3.1 核心控制系統(tǒng)電路的設(shè)計(jì)</p><p>  漢字的大小是16×16,但是單片機(jī)I / O端口不能滿足設(shè)計(jì)的要求,因此I / O端口必須擴(kuò)展。數(shù)據(jù)端口實(shí)現(xiàn)擴(kuò)展是兩個(gè)8255來實(shí)現(xiàn)的。通過74 HC373的低八個(gè)地址來給6264提供的信號(hào),但高八個(gè)地址所提供的信號(hào)P2.0 ~ P2.7,74 HC139是2 - 4解碼器,其輸入信號(hào)由P

9、2.6控制,單片機(jī)提供了控制外部的I / O設(shè)備,因?yàn)檫@個(gè)系統(tǒng)有超過一個(gè)的外部的裝置,確保他們不應(yīng)該是干擾的,因此保證他們的地址是唯一的,不重復(fù)。時(shí)鐘電路由AT89C52 的18、19腳從時(shí)鐘側(cè)(XTALI和XTAL2),和12兆赫晶體,電容C1和C2。</p><p>  3.2顯示存儲(chǔ)單元設(shè)計(jì)</p><p>  漢字顯示設(shè)計(jì)大小為32×32顯示屏,每個(gè)字符包括四個(gè)部分,每一

10、個(gè)包括四個(gè)矩陣大小是8×8的小點(diǎn)陣塊。顯示一個(gè)字符需要兩個(gè)74 HC154列掃描信號(hào)來提供。電路是通過動(dòng)態(tài)掃描信號(hào)來顯示,單片機(jī)把要求顯示的數(shù)據(jù)傳給了兩個(gè)8255。這樣人類的眼睛會(huì)看到一個(gè)穩(wěn)定的圖像。因?yàn)槿祟惖难劬σ曈X停留的現(xiàn)象。此外,因?yàn)闈h字每一個(gè)顯示需要128字節(jié)的存儲(chǔ)空間,但AT89C52單片機(jī)芯片只有256字節(jié)數(shù)據(jù)存儲(chǔ)器,它是遠(yuǎn)低于設(shè)計(jì)要求,所以我們擴(kuò)大了存儲(chǔ)空間采用8×8 K外部數(shù)據(jù)存儲(chǔ)器6264來實(shí)現(xiàn)的。

11、</p><p>  3.3數(shù)據(jù)輸入單元設(shè)計(jì)</p><p>  8255 Inte1是一種通用可編程并行輸入/輸出接口芯片。它的功能可通過設(shè)定軟件程序,具有很強(qiáng)的通用性。它可以直接通過數(shù)據(jù)總線連接到中央處理器外部設(shè)備,使用方便、靈活。Inte18255A有三個(gè)8位并行接口芯片的輸入和輸出端口、編程方法可以被用于設(shè)置三個(gè)端口作為輸入端口或輸出端口。當(dāng)這些數(shù)據(jù)通過數(shù)據(jù)總線上的CPU,采用無條

12、件轉(zhuǎn)讓、查詢傳輸或中斷傳輸。當(dāng)端口C作為一個(gè)數(shù)據(jù)端口,它不僅可作為8位數(shù)據(jù)端口,但也分別的作為兩個(gè)4比特?cái)?shù)據(jù)端口,可以設(shè)置一個(gè)特定的一些輸入或輸出,就這樣提供了便利的條件控制。</p><p>  在顯示單元電路的設(shè)計(jì),這些線條數(shù)據(jù)送給兩個(gè)8255。這個(gè)設(shè)計(jì)使用動(dòng)態(tài)顯示方式。顯示中文可以控制行或列掃描,系統(tǒng)采用的方法列掃描控制屏幕。列掃描電路由12塊74 HC154。 兩塊提供74 HC154傳送顯示一個(gè)字符。7

13、4 HC154輸入信號(hào)是P1.0 ~ P1.3提供通過AT89C52來控制的。</p><p>  3.4 串行通信接口設(shè)計(jì)</p><p>  PC和單片機(jī)通過串行通信聯(lián)系方式。為了實(shí)現(xiàn)串行通訊單片機(jī)與PC機(jī)采用串口通信方式,接口是標(biāo)準(zhǔn)RS - 232。在PC機(jī)的輸出電壓的RS - 232 C端口±12 V??紤]到單片機(jī)和PC短距離通信,單片機(jī)主要負(fù)責(zé)接收的命令和數(shù)據(jù)。從信號(hào)P

14、C機(jī)的TXD-side都變成一個(gè)電流信號(hào)通過交流電路,紅外光-發(fā)光二極管的電流有一個(gè)信號(hào)發(fā)生,燈發(fā)出的信號(hào)二極管投射到了phototransistor,并轉(zhuǎn)換為電信號(hào),然后輸入到單片機(jī)RXD身邊,所以光電轉(zhuǎn)換已經(jīng)實(shí)現(xiàn),并且電氣完全隔離以避免反饋干擾的輸出端所產(chǎn)生。</p><p><b>  4 軟件設(shè)計(jì)</b></p><p>  整個(gè)軟件設(shè)計(jì)的主要構(gòu)成由顯示程序和

15、通訊程序。漢字顯示的數(shù)據(jù)傳輸控制顯示函數(shù)采用動(dòng)態(tài)掃描。主機(jī)軟件實(shí)施視覺顯示效果。在標(biāo)準(zhǔn)串行通信,可以設(shè)置的串行通訊數(shù)據(jù)發(fā)送和接收,便于單片機(jī)與PC機(jī)間通信。為了保證可靠的通訊,確保雙方都相同的數(shù)據(jù)格式和波特率,該設(shè)計(jì)采用RS - 232通訊,10位數(shù)據(jù)格式,9600位/秒波特率。</p><p>  軟件程序由一開始,初始化,顯示程序。字符編碼儲(chǔ)存在靜態(tài)的6264,配置管理工具將等待信號(hào)給出。當(dāng)P3.0是低電平時(shí)

16、,顯示程序開始運(yùn)行。首先,控制到8255年控制字寫端口,8255工作采用模式0的方式。在控制完成后,將會(huì)把顯示的數(shù)據(jù)轉(zhuǎn)移到8255上,一排一排的數(shù)據(jù)輸入,每個(gè)第一排的信號(hào)控制下一排的開啟信號(hào)。在單片機(jī)是封閉的數(shù)據(jù)傳輸后,這樣的第一列顯示數(shù)據(jù),然后叫延遲程序顯示內(nèi)容的穩(wěn)定。第二列數(shù)據(jù)讀取程序延遲后結(jié)束了,下一個(gè)行是封閉的,所以第二欄里的數(shù)據(jù)也是如此顯示,等等。因?yàn)槠聊怀叽缡?2×192,192行顯示,顯示屏可以構(gòu)成一幅穩(wěn)定而且完

17、整的圖像。</p><p><b>  總結(jié)</b></p><p>  LED顯示系統(tǒng)的設(shè)計(jì)采用了主機(jī)和從屬結(jié)構(gòu)、主機(jī)電腦,供給從屬電腦顯示器上系統(tǒng)通過串行通信接口,它可以實(shí)現(xiàn)字符串修改、展示模式設(shè)置,時(shí)間設(shè)置和其他功能;單片機(jī)控制從屬結(jié)構(gòu)為主結(jié)構(gòu)顯示LED點(diǎn)陣顯示屏。漢字顯示是 32×32點(diǎn)陣模型,實(shí)現(xiàn)實(shí)時(shí)顯示屏幕顯示的變化,顯示當(dāng)前日期和時(shí)間。LED點(diǎn)

18、陣的設(shè)計(jì)顯示控制系統(tǒng)具有電路簡單、穩(wěn)定、低功率消耗、壽命長、易于顯示等特點(diǎn)。只要通過擴(kuò)展單片機(jī)的I / O,同時(shí)增加不同的LED點(diǎn)陣和相關(guān)驅(qū)動(dòng)芯片,你就可以設(shè)計(jì)一個(gè)更大的面積和更多LED顯示屏。本文提供了一些理論和實(shí)踐的參考價(jià)值。</p><p>  Design of LED Display Control System Based on</p><p>  AT89C52 Single

19、 Chip Microcomputer</p><p><b>  ABSTRACT</b></p><p>  This paper introduces display design process about hardware and software based on AT89C52 single chip microcomputer. We use a si

20、mple external circuit to control the display screen, which size is 32 × 192. The display screen also can display the size of the six 32 × 32 dot matrix Chinese characters by a dynamic scan mode, and can be divi

21、ded into two small display screens, which can display twenty-four Chinese characters whose size is 16×16. We can modify the code to change the content of the disp</p><p>  KEY WORDS LED, Chinese Chara

22、cter Display, AT89C52</p><p>  I. INTRODUCTION</p><p>  LED display has become an important symbol of the city lighting, modernization and information society with continuous improvement and bea

23、utification of people's living environment. LED lights can be seen in the large shopping malls, railway station, docks, underground station, and a variety of management window and so on. LED business has become a fas

24、t-growing new industry, a huge market space and bright prospects. The text, pictures, animation and video are displayed by LED’s light, and conten</p><p>  II. System Overall Structure Design</p><

25、p>  Single Chip Microcomputer (SCM) models were selected according to the target, function, reliability, cost, accuracy and speed of the control system. According to the actual situation of the subject, the choice of

26、SCM models mainly considered from the following two aspects: First, SCM has strong anti-interference ability; Second, SCM has a higher cost-effective. Due to MCS-51 is widely used in China, has more information and can c

27、ompatible with the more peripheral chips too, in particular, ATMEL </p><p>  The system was realized by the circuitry which is made up of AT89C52 chip, Clock circuit, reset circuit, column scan driver circui

28、t, line drive circuit and the six 32 × 32 LED dot matrix, the overall structure of LED characters display is shown in Fig.1. A display unit is composed of dot matrix and two 74HC154. Line data signal is divided into

29、 two parts, which is given by the two 8255A respectively, but the 8255A data are from the P0 port the master controller AT89C52. The column scanning signal</p><p>  III. SYSTEM HARDWARE CIRCUIT DESIGN</p&

30、gt;<p>  A. Circuit Design of MCU Control System</p><p>  The size of Chinese characters is 32 × 32, but microcontroller has 32 I/O port, and can’t meet design requirements, so the I/O port must

31、expand, the data port expansion was implemented by two 8255A. The data port expansion is shown in Fig.2, 74HC373 is the address latch, and latch low eight address, the low eight address signals of 6264 provided by it, bu

32、t the high eight address signals of 6264 provided by P2.0~P2.4, Internal port of 8255A was chosen by A0 and A1. 74HC139 is 2-4 decoder, whose i</p><p>  B The Circuit Design of Display Memory Unit</p>

33、<p>  The size of Chinese characters is 32×32 in the design, each character composed of four parts which each part composed of four LED matrix which the size is 8 × 8, circuit decomposition map of display

34、 unit. In addition, because the Chinese character for each display needs 128 bytes storage space, but AT89C52 microcontroller chip is only 256 bytes data memory, it is far less than the design requirements, so we the exp

35、anded storage space by 8K × 8 external data memory 6264. </p><p>  C The communicate Design of Pc</p><p>  Inte1 8255A is a universal programmable parallel input/output interface chip. Its

36、function can be set through the software program, and has a strong versatility. It can be directly through the CPU data bus connected to external devices, easy to use and flexible. Inte18255A interface chip has three 8-b

37、it parallel input and output ports, programming methods can be used to set three ports as input ports or output ports. Chips work have the basic input and output, strobe input/output and bidirection</p><p> 

38、 D Serial Communication Interface Circuit</p><p>  PC and SCM are linked via a serial communication interface. In order to implement serial communication function between MCU and PC, and serial interface lev

39、el of SCM will be changed into standard RS-232C level. MCU and PC, taking into account the short distance communication, and microcontroller is mainly responsible for receiving commands and data, so the PC is directly co

40、nnected with the microcontroller, this is the simplest connection method. the signals which is from Pac’s TXD-side were chan</p><p>  IV. SOFTWARE DESIGN</p><p>  The entire software design main

41、ly composes of display program and communication program. The Chinese characters to be displayed on the screen, character and other data for transmission control and display functions were achieved by dynamic scan. Real

42、time communication parts which communicate with PC receive data information by SCM serial disruption, so real-time data information transmission with PC was implemented. The host computer software was implemented by Visu

43、al Basic. In the standard ser</p><p>  Status, message formats and protocols are set, directly send data by Pac’s RS -232/RS-485 serial ports. In order to realized to PC reliable communication with SCM, and

44、ensure that both sides have the same data format and baud rate, this design uses RS-232 communications, a 10 bits data format, 9600bit / s baud rate. Software program composed of the beginning, initialization, display pr

45、ogram, front, which the main</p><p>  Character code stored in the static memory 6264, and the SCM will wait for signal is given, that is, the input signal of SCM pin P3.0. When P3.0 is from low to high, dis

46、play program begin to be run. First, control words written to 8255A control port, 8255A work in the form of mode 0 in the design. After control word was finished, the data will be displayed which is transferred to the 82

47、55A from the 6264, the display data is output for four times because the line width of the characters screen is</p><p>  CONCLUSION</p><p>  LED display system that was designed adopted the host

48、 computer and slave structure, the host computer is PC, and communicated with slave computer display system through the serial communication interface, which can implement string modification, display mode settings, time

49、 settings and other functions; The slave mainly implement display of LED dot matrix display screen</p><p>  This was controlled by SCM. Chinese character display is 32 ×32 dot matrix model, and to achie

50、ve real-time screen display changes, and have to display the current time and date functions. The design of LED dot matrix display control system has a simple circuit, stability, low power consumption, long life, easy to

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論