版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、<p> 1900單詞,1萬(wàn)英文字符,3185漢字</p><p> 出處:Song Y, Feng Y, Ma J, et al. Design of LED Display Control System Based on AT89C52 Single Chip Microcomputer[J]. Journal of Computers, 2011, 6(4):718-724.</p>
2、;<p> Design of LED Display Control System Based on AT89C52 Single Chip Microcomputer Yongxian Song ,Yuan Feng Juanli Ma and Xianjin Zhang <
3、/p><p> Abstract—This paper introduces display design process about hardware and software based on AT89C52 single chip microcomputer. We use a simple external circuit to control the display screen, which size
4、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 divided into two small display screen, which can display twenty-four
5、 Chinese characters whose size is 16×16. We can modify the code to change the content of </p><p> Index Terms—LED, Chinese Character Display, AT89C52 </p><p> I. INTRODUCTION </p>
6、<p> LED display has become an important symbol of the city lighting, modernization and information society with continuous improvement and beautification of people's living environment [6]. LED lights can be
7、seen in the large shopping malls, railway station, docks, underground station, a variety of management window and so on. LED business has become a fast-growing new industry, a huge market space and bright prospects [9].
8、The text, pictures, animation and video are displayed by LED’s light, and co</p><p> SCM has excellent cost performance, small size, high reliability, strong control, and widely used in smart instruments, m
9、echanical and electrical integration, realtime process control, robotics, domestic appliances, fuzzy control, communications systems and so on. </p><p> This article described the design by the LED display
10、relevant principle, and the design of hardware and software structure are described in detail, finally, we simulate for the overall design and analyze the results. </p><p> II. System Overall Structure Desi
11、gn </p><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 subj
12、ect, the choice of 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 in
13、formation and can compatible 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
14、 scan driver circuit, 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 sig
15、nal is divided into 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> Figure 1 The overall
16、structure of LED characters display</p><p> III. SYSTEM HARDWARE CIRCUIT DESIGN </p><p> A. Circuit Design of MCU Control System </p><p> The size of Chinese characters is 32 &
17、#215; 32, but microcontroller has 32 I/O port, and can’t meet design requirements, so the I/O port must expand, the data port expansion was implemented by two 8255A. The data port expansion is shown in Fig.2, 74HC373 is
18、the address latch, and latch low eight address, the low eight address signals of 6264 provided by it, but the high eight address signals of 6264 provided by P2.0~P2.4, Internal port of 8255A was chosen by A0 and A1. 74HC
19、139 is 2-4 decoder, whose i</p><p> The clock circuit of AT89C52 composed of 18, 19 feet from the clock side (XTALI and XTAL2), and 12MHz crystal X, capacitor C1 and C2, and uses on-chip oscillator mode.<
20、;/p><p> Reset circuit uses a simple power-on reset circuit, and mainly constitute of resistor R1, capacitor C3, connected to the AT89C52's reset input pin. </p><p> Figure.2. SCM control s
21、ystem circuit</p><p> B .The Circuit Design of Display Memory Unit </p><p> The size of Chinese characters is 32×32 in the design, each character composed of four parts which are (a), (b)
22、, (c), and (d), and each part composed of four LED matrix which the size is 8 × 8, circuit decomposition map of display unit is shown in Fig.3. The line signals of (a) ~ (b) are given by two 8255A, 1PA0 ~1PA7 and 1P
23、B0 ~1PB7 are PA and PB port of 8255A-1, 2PA0 ~ 2PA7 and 2PB0 ~ 2PB7 are PA and PB port of 8255A-2, the right figures represent column scan signals which is given by 74HC154. </p><p> Figure.3. Circuit dec
24、omposition map of display unit</p><p> C .The Design of Ranks Data Unit </p><p> Circuit Inte1 8255A is a universal programmable parallel input/output interface chip. Its function can be set t
25、hrough 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-bit parallel input and
26、 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 bid</p><p> Figure.4. Line data unit c
27、ircuit</p><p> In design of the display unit circuit, the lines data are given by two 8255A, as is shown in Figure 4. This design uses dynamic display means to display Chinese characters, which can be contr
28、olled the by the means of line or column scanning, The system uses the method of column scanning to control screen, Specific column scanning circuit is shown in Figure 5. Column scanning circuit composed of 12 pieces of
29、74HC154.Two pieces of 74HC154 provided 32 strobes to display a character. The input signa</p><p> Figure.5. column scan unit circuit</p><p> Figure.6. Serial Communication Interface Circui
30、t</p><p> 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,
31、 and serial interface level of SCM will be changed into standard RS-232C level [11]. Where the output voltage of PC’s RS-232C port is ± 12V. MCU and PC, taking into account the short distance communication, and mic
32、rocontroller is mainly responsible for receiving commands and data, so the PC is directly connected with the microcontroller, this is the simplest connect</p><p> IV. SOFTWARE DESIGN </p><p>
33、 The entire software design mainly 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 wer
34、e achieved by dynamic scan. Realtime communication parts which communicate with PC receive data information by SCM serial disruption, so real-time data information transmission with PC was implemented. </p><p&
35、gt; The host computer software was implemented by Visual Basic. In the standard serial communication, MSCOMM which is the power communication control is provided by VB, it can set the serial communication of data sent
36、and received, and the serial communication port status, message formats and protocols are set, directly send data by PC’s RS -232/RS-485 serial port. In order to realized to PC reliable communication with SCM, and ensur
37、e that both sides have the same data format and baud rate [11], t</p><p> 基于AT89C52單片機(jī)LED顯示屏控制系統(tǒng)設(shè)計(jì)</p><p> 摘要----本文介紹了展示基于AT89C52單片機(jī)設(shè)計(jì)的硬件和軟件過(guò)程。我們用一個(gè)簡(jiǎn)單的外部電路來(lái)控制顯示屏,它的大小是32*192。顯示屏幕還可以通過(guò)動(dòng)態(tài)掃描方式顯示6
38、個(gè)大小為32*32點(diǎn)陣漢字,并可分為2個(gè)小顯示屏,可顯示大小是16*16的二十四個(gè)漢字。我們可以修改代碼來(lái)改變顯示內(nèi)容,字幕可以實(shí)現(xiàn)滾動(dòng)功能,并且可以根據(jù)要求對(duì)滾動(dòng)速度進(jìn)行調(diào)整,字幕還可以實(shí)現(xiàn)暫停功能。漢字編碼存儲(chǔ)在外部數(shù)據(jù)存儲(chǔ)器中,數(shù)據(jù)存儲(chǔ)器的容量是根據(jù)我們想展示漢字的要求擴(kuò)展的。該顯示器具有體積小,硬件和電路結(jié)構(gòu)簡(jiǎn)單等優(yōu)點(diǎn)。關(guān)鍵詞:LED,中國(guó)漢字顯示,AT89C52</p><p><b> 一
39、、引言</b></p><p> 發(fā)光二極管顯示已成為城市照明、現(xiàn)代化和信息社會(huì)的重要標(biāo)志,是人們生活環(huán)境的不斷改善和美化的重要標(biāo)志之一[6]。LED燈可以在大型購(gòu)物商場(chǎng)、火車站、碼頭、地鐵站、各種管理窗口等地方看到,其主導(dǎo)的企業(yè)已成為一個(gè)快速增長(zhǎng)的新產(chǎn)業(yè),具有巨大的市場(chǎng)空間和光明前景[9]。文字,圖片,動(dòng)畫(huà)和視頻通過(guò)LED燈顯示,并且內(nèi)容可以改變。一些組件是模塊化結(jié)構(gòu)的顯示設(shè)備,通常由顯示模塊、控
40、制系統(tǒng)及電源系統(tǒng)組成。顯示模塊由發(fā)光二極管組成的點(diǎn)陣結(jié)構(gòu),負(fù)責(zé)發(fā)光顯示;電子屏幕可以顯示文字,圖片,視頻等,通過(guò)控制系統(tǒng),可以控制在相應(yīng)的區(qū)域的亮或暗,電力系統(tǒng)負(fù)責(zé)轉(zhuǎn)換輸入電壓電流成屏幕需要的電壓和電流。LED點(diǎn)陣顯示通過(guò)電腦提取個(gè)人顯示字符的字體,并將其發(fā)送到微控制器,然后顯示在點(diǎn)陣屏上,主要用于室內(nèi)外字符的顯示。發(fā)光二極管點(diǎn)陣顯示屏通過(guò)顯示內(nèi)容可分為圖形顯示、圖像顯示和視頻顯示。與圖像顯示相比顯示,圖形顯示的特點(diǎn)是:無(wú)論是單色還是彩
41、色顯示,在灰度上都沒(méi)有區(qū)別。因此,圖形顯示也未能反映豐富的顏色。視頻顯示不僅可以顯示運(yùn)動(dòng),清晰的彩色圖像,也可以顯示電視和計(jì)算機(jī)信號(hào)。雖然有三者之間的一些差異,但最基本的原則是相似的[ 6 ]</p><p> SCM具有優(yōu)良的性能價(jià)格比,體積小,可靠性高,強(qiáng)大的控制,并廣泛應(yīng)用于智能儀表,機(jī)電一體化,實(shí)時(shí)過(guò)程控制,機(jī)器人,小家電,模糊控制,通信系統(tǒng)等。</p><p> 本文介紹了設(shè)
42、計(jì)的相關(guān)原理,并對(duì)所設(shè)計(jì)的硬件和軟件結(jié)構(gòu)進(jìn)行了詳細(xì)的描述,最后,我們對(duì)整體的設(shè)計(jì)和分析進(jìn)行了仿真分析結(jié)果。</p><p> 二、系統(tǒng)總體結(jié)構(gòu)設(shè)計(jì)</p><p> 針對(duì)控制系統(tǒng)的目標(biāo)、功能、可靠性、成本、精度、速度等指標(biāo),選擇單片機(jī)(SCM)模型進(jìn)行了系統(tǒng)的設(shè)計(jì)。根據(jù)課題的實(shí)際情況,單片機(jī)的選擇主要從以下兩個(gè)方面考慮:一是單片機(jī)具有較強(qiáng)的抗干擾能力;二是單片機(jī)具有較高的成本效益。由于
43、MCS-51被廣泛應(yīng)用于中國(guó),有更多的信息,并能與更多的外圍芯片也兼容特別是ATMEL公司,于2003年推出的新一代微控制器,這是89S系列,其典型產(chǎn)品是具有高性能,低成本的單片機(jī)AT89C52。 AT89C52是一個(gè)低電壓,高性能CMOS8位單片機(jī),該芯片包括8 KB只讀程序存儲(chǔ)器(PEROM),它擦除可重復(fù),256byte的隨機(jī)存取數(shù)據(jù)存儲(chǔ)器(RAM),器件采用高密度非易失性存儲(chǔ)器技術(shù)生產(chǎn),與標(biāo)準(zhǔn)MCS-51指令集和8052產(chǎn)品兼容
44、,而芯片內(nèi)置的通用8位中央處理(CPU),閃存存儲(chǔ)單元,可應(yīng)用于更復(fù)雜的控制應(yīng)用[ 10]。</p><p> 該系統(tǒng)是由它是由AT89C52芯片,時(shí)鐘電路的電路實(shí)現(xiàn),復(fù)位電路,列掃描驅(qū)動(dòng)電路,行驅(qū)動(dòng)電路和六個(gè)32×32點(diǎn)陣LED,LED字符顯示器的整體結(jié)構(gòu)示于圖1。顯示單元是由點(diǎn)陣和兩個(gè)74HC154構(gòu)成的。線數(shù)據(jù)信號(hào)被劃分成兩部分,這是由兩個(gè)8255A分別給予,但8255A的數(shù)據(jù)是從P0口主控制器
45、AT89C52。每個(gè)字符的列掃描信號(hào)被由兩個(gè)74HC154給出的74HC15412件,被分為六組。74HC154的輸入信號(hào)是由AT89C52的P1.0?P1.3給出。與AT89C52的P0口連接外部數(shù)據(jù)存儲(chǔ)器6264。</p><p> 圖1發(fā)光二極管字符顯示的整體結(jié)構(gòu)</p><p> 三、系統(tǒng)硬件電路設(shè)計(jì)</p><p> A.單片機(jī)控制系統(tǒng)的電路設(shè)計(jì)&l
46、t;/p><p> 中國(guó)漢字的尺寸為32×32,但單片機(jī)有32個(gè)I / O口,并不能滿足設(shè)計(jì)要求,因此I / O端口必須擴(kuò)大,數(shù)據(jù)端口擴(kuò)展是由兩個(gè)8255A實(shí)現(xiàn)。數(shù)據(jù)端口擴(kuò)展如圖2所示,74HC373為地址鎖存器,并且鎖存低8位地址,低8位地址信號(hào)由6264提供,但是6264高8位地址信號(hào)是由P2.0?P2提供。 8255A_內(nèi)部端口是由A0和A1選擇。 74HC139為2-4譯碼器,其輸入信號(hào)通過(guò)P2.
47、6和單片機(jī)P2.7,提供和外部I / O設(shè)備提供頻閃,因?yàn)橄到y(tǒng)有多個(gè)外部設(shè)備,確保他們不能被選通,所以它們的地址是唯一的,不重復(fù)。</p><p> AT89C52的時(shí)鐘電路組成1819英尺的鐘面(XTALI和XTAL2)和12MHz晶振X,電容C1和C2_并使用片上振蕩器模式。</p><p> 復(fù)位電路采用一個(gè)簡(jiǎn)單的上電復(fù)位電路,并主要由電阻R1、電容C3,連接到單片機(jī)的復(fù)位輸入引
48、腳。</p><p> 圖2.單片機(jī)控制系統(tǒng)電路</p><p> B.顯示存儲(chǔ)器單元電路設(shè)計(jì)</p><p> 漢字的大小是32×32,在設(shè)計(jì)中,每個(gè)四部分組成的字符將在(A),(B),(c)和(d)中,每個(gè)部分包括四個(gè)LED矩陣的大小是8×8,顯示部的電路分解圖如圖3所示。線路信號(hào)(a)?(b)由8255A提供,1PA0?1PA7和1P
49、B0?1PB7是PA和PB的8255A-1端口,2PA0?2PA7和2PB0?2PB7是PA和PB的8255A-2端口,右邊的數(shù)字代表由74HC154定列掃描信號(hào)。 16列選通74HC154所提供的,(a)?(d)需要八個(gè)信號(hào),分別為以(a)和(b)共用一個(gè)74HC154,(c)和(d)共用一個(gè)74HC154。顯示一個(gè)字符需要兩個(gè)74HC154提供列掃描信號(hào)。當(dāng)電路工作時(shí),(a)?(d)中通過(guò)在適當(dāng)?shù)捻樞驋呙栊盘?hào)選通,一次只有一個(gè)被選通
50、,并且其他列都熄滅,所顯示的數(shù)據(jù)是由8255A的兩片同時(shí)提供,人類的眼睛會(huì)看到一個(gè)穩(wěn)定的角色,由于人眼的視覺(jué)暫留。此外,由于每個(gè)顯示的漢字需要128字節(jié)的存儲(chǔ)空間,但是AT89C52單片機(jī)芯片只有256字節(jié)數(shù)據(jù)存儲(chǔ)器,它遠(yuǎn)低于設(shè)計(jì)要求,所以我們的擴(kuò)展存儲(chǔ)空間8 k×8 6264年外部數(shù)據(jù)存儲(chǔ)器。</p><p> 圖3.顯示單元的電路分解圖</p><p><b>
51、 c.數(shù)據(jù)單元的設(shè)計(jì)</b></p><p> 電路Intel 8255A是一個(gè)通用可編程并行輸入/輸出接口芯片,其功能可通過(guò)軟件程序設(shè)置,并具有很強(qiáng)的通用性,它可以通過(guò)CPU數(shù)據(jù)總線連接到外部設(shè)備,易于使用,靈活直接。 Intel 8255A接口芯片具有3個(gè)8位并行輸入和輸出端口,編程方法可用于設(shè)置三個(gè)端口為輸入端口或輸出端口。芯片工作具備基本輸入輸出,選通輸入/輸出和雙向輸入/輸出。當(dāng)數(shù)據(jù)通過(guò)C
52、PU的數(shù)據(jù)總線傳輸,其可以選擇無(wú)條件轉(zhuǎn)移,查詢發(fā)送或中斷發(fā)送。期間Intel 8255A芯片三端口,端口C不僅可被用作數(shù)據(jù)端口,而且還可以用作控制端口。當(dāng)端口C被作為一個(gè)數(shù)據(jù)端口,它不僅可被用作8位數(shù)據(jù)端口,而且還分別作為兩個(gè)4位數(shù)據(jù)端口,端口C的每個(gè)位可以被操作,可以設(shè)置一個(gè)特定位輸入或輸出,從而提供控制位便利條件。</p><p> 在顯示單元電路設(shè)計(jì)、線路數(shù)據(jù)由兩8255A給出,如圖4所示。本設(shè)計(jì)采用動(dòng)態(tài)
53、顯示方式,顯示漢字,可控制通過(guò)行或列掃描,系統(tǒng)采用柱掃描到控制屏的方法,具體的列示掃描電路如圖5所示。柱掃描電路由12件構(gòu)成。兩個(gè)74HC154顯示字符設(shè)置32道閘門。74HC154輸入信號(hào)P1.0 P1.3是由AT89C52提供來(lái)控制的屏幕,但在設(shè)計(jì)中使用12片的74HC154,它們的工作是按照順序,另一片74HC154輸入是P1.4 ~ P1.7由AT89C52來(lái)控制屏。</p><p> 圖4.線數(shù)據(jù)單元
54、電路</p><p> D.串行通信接口電路</p><p> 上位機(jī)和SCM通過(guò)串行通信接口相連。為了實(shí)現(xiàn)單片機(jī)與PC機(jī)與單片機(jī)的串行接口電平之間串行通信功能將變?yōu)闃?biāo)準(zhǔn)的RS-232C電平[11]。其中,個(gè)人電腦的RS-232C端口的輸出電壓為±12V。單片機(jī)與PC,考慮到短距離通信,以及微控制器主要負(fù)責(zé)接收命令和數(shù)據(jù),所以PC直接與微控制器相連,這是最簡(jiǎn)單的連接方法。這是
55、從個(gè)人計(jì)算機(jī)的TXD端的信號(hào)被通過(guò)通信線路改變成電流信號(hào),當(dāng)信號(hào)發(fā)生optocouper的紅外線lightemitting二極管具有電流,其通過(guò)二極管投射到光電晶體管發(fā)射,并轉(zhuǎn)換成電的光信號(hào)信號(hào),然后輸入到微控制器的RXD側(cè),所以光電轉(zhuǎn)換被實(shí)現(xiàn),并且電被完全隔離,以避免其通過(guò)輸出端產(chǎn)生的反饋和干擾。如在圖6中示出</p><p> 圖5.列掃描單元電路</p><p> 圖6.串行通信
56、接口電路</p><p><b> 四、軟件設(shè)計(jì)</b></p><p> 整個(gè)軟件設(shè)計(jì)主要包括顯示程序和通信程序。在屏幕上顯示的中文字符,字符和其他數(shù)據(jù)傳輸控制和顯示發(fā)揮功能,實(shí)現(xiàn)動(dòng)態(tài)掃描。實(shí)時(shí)通信部分與上位機(jī)通信,通過(guò)單片機(jī)串行中斷接收數(shù)據(jù)信息,實(shí)現(xiàn)數(shù)據(jù)信息的實(shí)時(shí)傳輸實(shí)施個(gè)人電腦。</p><p> 上位機(jī)軟件由Visual Basi
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫(kù)僅提供信息存儲(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 外文翻譯--基于at89c52單片機(jī)led顯示屏系統(tǒng)設(shè)計(jì)
- 外文翻譯--基于at89c52單片機(jī)led顯示屏系統(tǒng)設(shè)計(jì)(英文)
- 畢業(yè)論文外文翻譯-基于at89c52單片機(jī)led顯示屏控制系統(tǒng)設(shè)計(jì)
- 基于at89c52單片機(jī)的led點(diǎn)陣顯示屏系統(tǒng)設(shè)計(jì)
- 基于at89c52單片機(jī)的led顯示控制系統(tǒng)的設(shè)計(jì)
- 基于at89c52單片機(jī)的led顯示控制系統(tǒng)的設(shè)計(jì)
- 基于AT89C52單片機(jī)的LED顯示控制系統(tǒng)的設(shè)計(jì).pdf
- 基于AT89C52單片機(jī)的LED顯示控制系統(tǒng)的設(shè)計(jì).pdf
- 基于AT89C52單片機(jī)的LED顯示控制系統(tǒng)的設(shè)計(jì).doc
- 基于AT89C52單片機(jī)的LED顯示控制系統(tǒng)的設(shè)計(jì).doc
- at89c52單片機(jī)簡(jiǎn)介外文翻譯
- 單片機(jī)控制led顯示屏系統(tǒng)
- 基于at89c52單片機(jī)的交通燈控制系統(tǒng)的設(shè)計(jì)(外文翻譯)
- 基于AT89C52單片機(jī)溫度控制系統(tǒng)的設(shè)計(jì).pdf
- 外文翻譯--at89c52單片機(jī)的介紹
- 外文翻譯--基于at89c51單片機(jī)的led顯示控制系統(tǒng)
- 單片機(jī)課程設(shè)計(jì)-基于at89c52單片機(jī)的led點(diǎn)陣顯示電子鐘設(shè)計(jì)
- 基于AT89C52單片機(jī)的溫度控制系統(tǒng)的設(shè)計(jì).pdf
- 單片機(jī)課程設(shè)計(jì)--基于at89c52單片機(jī)的led點(diǎn)陣顯示電子鐘設(shè)計(jì)
- 基于at89c52單片機(jī)的超聲檢測(cè)控制系統(tǒng)
評(píng)論
0/150
提交評(píng)論