液晶显示英文翻译.doc_第1页
液晶显示英文翻译.doc_第2页
液晶显示英文翻译.doc_第3页
液晶显示英文翻译.doc_第4页
液晶显示英文翻译.doc_第5页
免费预览已结束,剩余16页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Design of LED Display Control System Basedon AT89C52 Single Chip Microcomputer 基于AT89C52单片机的LED显示屏控制系统的设计Yongxian Song宋永献The Institute of Electronic Engineering Huaihai Institute of Technology Lianyungang,China淮海工学院电子工程学院 中国 连云港 Yuan Feng Juanli Ma and Xianjin ZhangThe Institute of Electronic Engineering Huaihai Institute of Technology Lianyungang,China 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 is 32192. 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 Chinese characters whose size is 1616. We can modify the code to change the content of the display,subtitles can achieve scrolling function and the scroll speed can be adjusted according to requirements, subtitles can also achieve pause function. The Chinese character code stored in external data memory, the capacity of data memory is expanded according to the requirements of Chinese characters we want to show. This display screen has advantages of small volume, few hardware and simple circuit structure.Index Terms-LED, Chinese Character Display, AT89C52摘要这篇论文介绍了基于AT89C52单片机关于硬件和软件的显示设计过程。我们用一个简单的外部电路控制显示屏,其大小为32192。这个显示屏幕的大小也可以显示六个3232点阵汉字动态扫描的模式,可以分为两个小显示屏,可以同时显示24汉字,其尺寸大小是1616。我们可以修改这个代码来改变显示的内容,可以实现根据滚动字幕功能和滚动速度需求灵活调整,字幕也可以达到停顿功能。汉字代码存储在外部数据存储器,其数据存储能力是根据我们想要显示汉字的需求进行扩展的。该显示屏具有体积小、硬件少和电路结构简单的优点。关键词-LED,汉字显示,AT89C52I. INTRODUCTION 简介LED display has become an important symbol of the city lighting, modernization and information society with continuous improvement and beautification of peoples living environment 6. LED lights can be 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. The text, pictures, animation and video are displayed by LEDs light, and content can be changed. Some components are the display devices of the modular structure, and which usually consists of a display module, control system and power system. The display module is constituted by the lattice structure which consists of LED, and is responsible for light-emitting display; the screen can display text, pictures, video and so on by control system which can control light or dark of LED in the corresponding region;Power system is responsible for transforming input voltage an d current into voltage and current which the screen needs. LED dot matrix display extracted display character font through PC, and sent to the microcontroller, then displayed in the dot matrix screen, which mainly used for display of indoor and outdoor characters. LED dot matrix display can be divided into graphic display,image display and video display by displayed content.Compared with the image display, the characteristics of graphic display is no difference in gray color whether it is monochrome or color display. Therefore, graphic display also fails to reflect the richness of color, and video display can not only show exercise, clear and full-color images, but also show television and computer signals.Although there are some differences between the three,but the most basic principles are similar 6.LED显示屏已成为一个城市照明、现代化、信息社会与持续改进和美化人们的生活环境的重要象征6。LED灯可以在大型购物商场、车站、码头、地铁站、各种管理窗口等等地方见到。LED产业已经成为了快速增长的新兴产业,具有巨大的市场空间和应用前景9。文本、图片、动画和视频这些都可以通过LED的光线来显示,并且内容是可以改变的。一些元器件是模块化结构的显示装置,其通常是由显示模块、控制系统和电力系统组成的。显示模块是由包含LED的晶体结构组成的,且由其负责发光显示;这个屏幕可以通过控制系统显示文本、图片、视频等,这些控制系统控制LED在相应的区域亮或灭;电力系统负责将输入电压和电流转换成屏幕显示所需要的电压和电流。LED点阵显示器通过PC提取显示汉字的字体,并且传送给单片机,然后显示在点阵屏上,这个显示屏主要用于显示的室内和室外的人物角色。LED点阵显示器根据显示的内容可分为图形显示、图像显示和视频显示。与图像显示相比,图形显示的特点是无论它是单色的还是彩色显示的,在灰色显示中没有区别,。因此,图形显示中也不能反映出丰富的色彩,而视频显示不仅能显示动态、清晰、彩色的图像,而且也显示电视和电脑的信号。虽然在这三者之间有一些差异,但是最基本的原理是相似的6。 SCM has excellent cost performance, small size, high reliability, strong control, and widely used in smartinstruments, mechanical and electrical integration, real-time process control, robotics, omestic appliances, fuzzy control, communications systems and so on.This article described the design by the LED display 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. 单片机具有良好的性价比,体积小、可靠性高,有较强的控制力,并且广泛应用于智能仪表、机电一体化、实时过程控制、机器人、家用电器、模糊控制、通信系统等。本文对LED显示屏设计中的相关原理、硬件设计和软件结构进行了详细的阐述,最后,我们模拟总体设计和分析的结果。II. System Overall Structure Design 系统整体结构设计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 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 compatible with the more peripheral chips too, in particular, ATMEL Corporation, introduced a new generation microcontroller in 2003, that is 89S series,and its typical products with high performance and low cost microcontroller is AT89C52. AT89C52 is a low voltage, high-performance CMOS 8-bit microcontroller, the chip includes 8 KB read-only program memory (PEROM) which erase can be repeated, 256byte random access data memory (RAM), devices adopt high-density nonvolatile memory technology to produce, compatible with the standard MCS-51 instruction set and the 8052 products, while the chip built-in general-purpose 8-bit central processing (CPU) , Flash storage unit, can be applied to the more complex control applications10.单片机(SCM)模型的选择是根据目标、功能、可靠性、成本、精度和控制系统的速度。根据主体的实际情况,单片机(SCM)模型的选择主要考虑以下两个方面:第一,单片机(SCM)具有较强的抗干扰能力;第二,单片机(SCM)具有较高的性价比。由于在中国mcs51汇编语言中得到了广泛的应用,有更多的信息,并且可以配合外围芯片也更多,特别是ATMEL公司在2003年推出了新一代单片机,即89年代系列,并且其典型产品是具有高性能、低成本的AT89C52单片机。AT89C52是一个低电压,高性能CMOS 8位的单片机,晶片含有8 k只读存储器(PEROM)程序可以被重复删除,256字节随机存取数据存储器(RAM),装置采用高密度工艺生产的非挥发性记忆体,可与标准mcs51汇编语言指令集以及8052年的产品兼容,而芯片内置有通用8位中央处理器(CPU)、Flash存储单元,可适用于更复杂的控制应用10。The system was realized by the circuitry which is made up of AT89C52 chip, Clock circuit, reset circuit, column scan driver circuit, line drive circuit and the six 32 x 32 LED dot matrix, the overall structure of LED characters display is shown in Fig.l. A display unit is composed of dot matrix and two 74HC154. Line data signal is divided into two parts, which is given by the two 8255A respectively, but the 8255A data are from the PO port the master controller AT89C52. The column scanning signal of each character was given by the two 74HC154, the 74HC154 12 pieces and was divided into six groups. The input signal of 74HC 154 was given by the PLO-P1.3 of AT89C52. External data memory 6264 connected with the AT89C52 the PO port.该系统所实现的电路是由AT89C52芯片、时钟电路、复位电路、柱扫描驱动电路、线、驱动电路和六3232 LED点阵组成的,LED的整体结构特点如图1。一个显示单元包含点阵和两个74 HC154。线数据信号分为两个部分,这是由两个8255A分别提供的,但是8255A的数据老源于PO港口的AT89C52主控制器。每个字符的列扫描信号的是由两个74HC154提供的,74 HC154 有12件,分为6组。74 HC154所输入的信号是由PLO-P1.3 AT89C52提供的。外部数据存储器6264与PO港口的AT89C52相联系。III. SYSTEM HARDWARE CIRCUIT DESIGN 系统的硬件电路设计A. Circuit Design of MCU Control System 单片机控制系统电路的设计 The size of Chinese characters is 32 x 32, but microcontroller has 32 I/O port, and cant 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 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 Al. 74HC139 is 2-4decoder, whose input signals are provided by P2.6 and P2.7 of SCM, and provided strobe for the external I / 0 devices, because the system has more than one external device, make sure that they can not be gated, so that their addresses is the only and do not repeat. 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.Reset circuit uses a simple power-on reset circuit, and mainly constitute of resistor RI, capacitor C3, connected to the AT89C52s reset input pin.汉字字符的大小是3232,但单片机有32I / O端口,不能满足设计要求,所以I / O端口必须扩大,数据港口拓展是由两个8255A执行的。数据端口扩展如图2,这个地址门闩是74HC373,门闩低八地址,低八地址的6264信号是由它所提供的,但高八地址的6264信号是由 P2.O-P2.4所提供的,8255A的内部港口被A0和A1所选择。74 HC139是2-4decoder,其输入信号P2.6和 P2.7所提供的供应链管理,并提供闸门的外部I/ 0装置,因为这个系统有超过一个外部设备,确保他们不能被封闭,因此他们的地址是唯一的和不重复的。AT89C52时钟电路是由18、19英尺的时钟侧(XTALI和XTAL2),和12MHz晶体X,电容C1和C2所组成的,并使用单片振荡模式。复位电路使用一个简单的power-on复位电路,并且主要包含电阻RI、电容C3,与AT89C52输入密码重置相联系。B The Circuit Design of Display Memory Unit 电路设计的显示存储单元组成 The size of Chinese characters is 32x32 in the design, each character composed of four parts which are (a), (b), (c), and (d), and each part composed of four LED matrix which the size is 8 x 8, circuit decomposition map of display unit is shown in Fig.3. The line signals of (a)(b) are given by two 8255A, 1 PA0 -1 PA7 and 1 PB0-4PB7 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 74HC 154. 16 column strobes are provided by 74HC154, (a) - (d) requires eight signal, respectively, so (a) and (b) share a 74HC 154, (c) and (d) shared a 74HC154. Display a character need two 74HC154 which provide column scan signals. When the circuit works, the (a) - (d) is gated by scanning signal in proper order, only one was gated at a time, and other columns are extinguished, the displayed data is given by two pieces of 8255A simultaneously, the human eye will see a stable character because of the human eyes persistence of vision. 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 expanded the storage space by 8K x 8 external data memory 6264. 在设计过程中汉字是大小的32 x32,每个字符由四个部分所组成,它们是(a),(b),(c),(d),并且每一个部分由4个矩阵的大小是88的LED所组成,显示单元的电路分解图如图3。(a)(b)的线信号两个8255A所提供的,1PAO0-1 PA7和1 PB0-4PB7是8255A-1相应的端口PA和PB,2 PA0- 2PA7和2PB0 - 2PB7是8255A-2相应的的端口PA和PB,正确的数据代表扫描信号柱给出了HC 154。16个柱闸门是由74HC154所提供的,(a)-(d)各自需要八个信号,所以(a)和(b)共享一个74 HC 154,(c)和(d)共享一个74 HC154。显示一个字符需要两个74 HC154列扫描提供信号。当电路工作时,(a)-(d)是通过扫描信号封闭排序的,一次只排列一个,而其他的柱熄灭,显示的数据是由两块8255 A同时给出,由于人的眼睛具有视觉暂留的特点,因而人的眼睛会看到一个稳定的字符。此外,因为显示每一个汉字需要128字节的存储空间,但AT89C52单片机芯片只有256字节数据存储器,它远低于设计要求,所以我们通过8 K8外部数据存储器6264来扩展存储空间。C The Design of Ranks Data Unit Circuit 等级数据单元的设计电路Intel 8255A is a universal programmable parallel input/output interface chip. Its 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-bit 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 bidirectional input / output. When the data were transmitted by data bus of CPU, its can choose to unconditionally transfer, query transmission or interrupt transmission. During Intel 8255A chip three-port, the port C can be used as not only the data port, but also the control port. When the port C is taken as a data port, it can be used as not only 8-bit data port, but also separately as two 4-bit data port, and each bit of the port C can be operated, can set a particular bit to input or output, so provide convenient conditions for bits control.英特尔8255 A是一种通用可编程并行输入/输出接口芯片。其功能可以通过软件程序设定,具有很强的通用性。它可以直接通过中央处理器数据总线连接到外部设备,使用方便、灵活。Inte18255A接口芯片有三个8位并行的输入和输出端口,编程方法可以被用于设置三个端口作为输入端口或输出端口。芯片工作都有基本的输入和输出,闸门输入/输出和双向输入/输出。当这些数据被传输的数据总线上的CPU时,其可选择无条件转让、查询传输或中断传输。在英特尔8255A芯片三个端口中,端口C不仅可作为数据端口,而且可作为控制港口。当端口C作为数据端口时,它不仅可以作为8位数据端口,而且也分别作为两个4位的独立数据端口,每一个端口C的位都可以被操控,可以设定一个特定的位去输入或输出,因此对位控制提供了便利的条件。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 controlled 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 74HC154.Two pieces of 74HC154 provided 32 strobes to display a character. The input signal of 74HC 154 is P 1.0 - P 1.3 which is provided by AT89C52 to control screen, but 12 pieces of 74HC 154 were used in the design, they work according to the order, the input of another piece of 74HC 154 is P IA - P1.7 which is provided by AT89C52 to control screen.在显示单元电路的设计,线数据是由两个8255A所给出的,如图4所示。该设计采用动态显示方式显示汉字,而这可以通过行或列扫描方式来控制,该系统采用柱的方法来控制屏幕扫描,扫描电路的具体情况如图5所示。列扫描电路是由12个74 HC154组成的 。两块74 HC154 提供32 次闪光来显示一个字符。74 HC154的输入信号是P 1.0- P 1.3,其是由AT89C52来控制屏幕,但在设计过程中使用了12块74 HC154,他们的工作是根据这个秩序进行的,另一块74 -HC154的输入是PIA-P1.7,并且由AT89C52所提供的P1.7来控制屏幕。D Serial Communication Interface Circuit 串行通信接口电路 PC and SCM are linked via a serial communication interface. In order to implement serial conununication function between MCU and PC, and serial interface level of SCM will be changed into standard RS-232C level 11 . Where the output voltage of PCs RS-232C port is 1 12V. 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 connected with the microcontroller, this is the simplest connection method. the signals which is from PCs TXD-side were changed into a current signal through the communication circuit, the infrared light-emitting diodes of optocouper have current when a signal occurs, the light signals which is emitted by diode projected onto the phototransistor, and converted to electric signal, then input to the microcontroller RXD side, so photoelectric conversion is implemented, and electrical is completely isolated to avoid the feedback and interference which is produced by output side. as isshown in Figure 6 PC和单片机是通过一个串行通信接口连接在一起的。为了实现单片机和PC的串行通信函数功能,单片机串行接口水平将会变成标准RS - 232 - C水平11。在PC机的输出电压的RS - 232 C端口是12伏。单片机和PC,考虑到短距离通信,单片机主要负责接收的命令和数据,所以在PC直接关系到单片机,这是最简单的关联方法。信号从PC机的TXD-side被改变成一个电流信号通过通信电路、红外发光二极管的电流optocouper 当有信号发生时,二极管发出的光信号通过光敏三极管投射,并转换为电信号,然后输入到单片机RXD身边,因而光电转换得以实现,并且电气完全隔离以避免输出端所产生反馈和干扰。如图6所示。IV. SOFTWARE DESIGN 软件设计 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 were achieved by dynamic scan. Real-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 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 and received, and the serial communication port status, message formats and protocols are set, directly send data by PCs RS -232/RS-485 serial port. In order to realized to PC reliable communication with SCM, and ensure that both sides have the same data format and baud rate 11, this design uses RS-232 communications,a 10 bits data format. 9600bit / s baud rate.整个软件设计的主要构成包括显示程序和通信程序。汉字显示在屏幕上,字符和其他数据的传输、控制和显示功能则是通过动态扫描实现的。与PC通信的实时通信部件是通过单片机串行干扰信息来接收数据的,所以与PC之间实时数据信息的传输才得以执行。主机软件是通过视觉化Basic程式语言实施的。在标准串行通讯中,电力通信MSCOMM是由VB控制的,它可以设置串行通讯的数据发送和接收、串行通讯端口状态,消息格式和协议,直接用PC发送数据RS / RS485的串行端口。为了实现PC与单片机的可靠的通讯,确保双方都有相同的数据格式和传输速率11,该设计采用RS - 232通讯,一种10位数据格式。9600位/秒传输速率。A Principles of Chinese characters dot matrix display and Sub-codes 汉字的原则和Sub-codes点阵显示Chinese Times New Roman font which is UCDOS was taken as an example, each word composed of 16 x 16 dot matrix. That is, every word of the national standard Chinese character library expressed by the 256 lattice.We can understand each point as a pixel, and the shape of each word understood as an image. In fact, this character display screen not only can display Chinese characters, but also can display any graphics within the scope of 256 pixels. Due to the bus of microcontroller is the 8-bit, and a word need to split into two parts, as is shown figure 7.UCDOS曾以华夏时报新罗马字体为例,每一个字是由1616的点阵所组成的。那也就是说,国家标准中文图书馆的每一个字都是由256格所表达的。我们可以理解每一个点作为一个像素,每个单词的形状理解为一个图像。事实上,这个字符显示屏不仅能显示汉字,而且可以显示在256像素范围内的任何图形。由于汽车是8位的单片机,并且一个词需要分成两部分,如图7所示。In order to understand Chinese characters dot matrix composition law, at first, the characters code was obtained by column scanning method. Chinese characters are divided into upper part and lower part, the upper part composed of 8 x16 lattice, the lower part was also formed by the 8 x 16 lattice. The first column of the upper left corner which was the upper part was shown by Column scanning method first, namely, POO-P07 port of 0 column, direction was POO-P07, Chinese character for large was displayed, P05 was on, the other is off. That is, binary is 00000100, and convert to hexadecimal as 04h.After the first column of the upper part was over, and continue to scan the bottom half of the first column, It can be seen from Figure 7, this column is not on all, that is, binary was 00000000, hex was 00h. According to this method, the second column, third column, until the sixteenth was scanned in turn. Characters big scan code can be drawn.为了了解点矩阵组成汉字的规则,首先,字符代码是通过列扫描方法得到的。汉字分为上半部分和下半部分,上方816格子组成的,下半部分也由816的晶

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论