Design of Embedded Color Display System Based on C8051F120 Core

introduction

With its affinity with users and natural human-computer interaction interface, embedded devices have developed rapidly and penetrated into every corner of life. The design method introduced in this paper is based on high-performance 8-bit single-chip C8051F120 as the core processor, SRAM as the system's memory, FPGA to achieve timing conversion, and low-temperature (-10 °C) embedded display system. The interface operation is realized by the PC keyboard and the touch screen, and finally the national standard one/two-level Chinese characters, ASCII characters and 65 536 color graphics and pictures are displayed on the liquid crystal display, and a simple operation interface is created.

1 System working principle

The process of displaying Chinese characters, English characters, and color graphics is to convert character and graphic information into dot matrix information that can be displayed on a liquid crystal display. In order to display characters, the ASCII code dot matrix font and the Chinese character dot matrix word array arranged by the location code are stored in the external Flash ROM of the single chip (constituting the dot matrix data area), and the characters used in the program are taken as the internal code. The form is stored in the Flash ROM (constituting the text data area). When displayed, the MCU reads the Chinese character machine internal code from the text data area, converts it into the font address of the dot matrix data area in the FlashROM, reads the dot matrix data of the character through the address, and further converts it into the data that can be displayed by the liquid crystal display and sends it. Subsequent processing and display. In this way, various characters including the national standard one/two-level Chinese characters, uppercase and lowercase English characters, punctuation and numbers can be displayed during the operation. When displaying color graphics, because the storage space of the image is relatively large, there is not enough space in the system. The color image of the bmp format in the PC can be converted into a format and sent to the MCU for real-time processing and display.

LCD monitors operate at frequencies from 4.5 to 6.8 MHz and require complex timing. Considering the working speed of the single-chip microcomputer and the working frequency of the liquid crystal display, on the one hand, the liquid crystal display can be continuously refreshed at the working frequency to work, and a large amount of display data and control information needs to be transmitted; on the other hand, the single-chip microcomputer has to perform many processing work even if it is working. At 100MHz, it will also become the bottleneck of the system operating rate. In order to solve this problem, add a SRAM as a memory, add an FPGA to achieve timing conversion and control and refresh the LCD. FP GA reads/writes SRAM in a time-sharing manner. Under the action of the clock, the FPGA reads data from the SRAM for half of the time (when the clock signal is high), and continuously refreshes the liquid crystal display; the other half of the time (the clock signal is low) Normally, if the microcontroller has data to be sent, write this data to the SRAM. The use of time-sharing operation can receive and store the data of the single-chip microcomputer while continuously refreshing the liquid crystal display, so that the work of the two aspects does not affect each other, not only reduces the workload of the single-chip microcomputer, but also fully exerts the performance of the FPGA.

Selecting the liquid crystal display with a touch screen and connecting the touch screen to the handwriting recognition controller can increase the handwriting recognition function and provide a friendly human-computer interaction interface. The system block diagram can be drawn from the above analysis, as shown in Figure 1.

a.JPG

2 system hardware design

In this embedded display system, a liquid crystal display model of the Sharp model LQ0357DH01 is used, and the operating temperature range is -10 to 70 ° C, and the minimum operating temperature is relatively lower.

The display module is composed of a color active dot matrix LCD module and an amorphous silicon TFT, and thus may be referred to as an AD-TFT (Advanced TFT). It consists of a color TFT-LCD panel, an IC driver, an FPC, a backlight, a resistive touch screen, and a back seal box, but the module does not include a control circuit. The display operates at a frequency of 4.5 to 6.8 MHz with a resolution of 240 & TImes; 320 pixels and a color bit depth of 18 bits. Graphics and text can be displayed on a 240x 320 dot matrix display in 262 11 4 colors. However, considering the data bus width of the single chip microcomputer is 8 bits, in order to simplify the operation process, the color depth can be determined to be 16 bits, and the single chip transmits the color data of each pixel twice. This simplified operation also satisfies the requirement to display 65 536 color graphics.

In order to improve the operating speed of the whole system, a high-performance 8-bit MCU model C8051F120 is used as the processor. The C8051F120 uses Silicon Labs' patented CIP-51 microcontroller core. The CIP-51 is fully compatible with the MCS-51 instruction set and can be developed using the standard 803x/805x assembler and compiler. The C8051F120's stable maximum system clock frequency is 100 MHz and peak performance is 100 MIPS.

Flash uses M29W400BB (512K & TImes; 8 bits), which is a readable, erasable, and reprogrammable Flash. The FPGA uses the Xilinx Spartan-II series XC2S1 00. The XC2S100 is an FPGA with 100,000 system gates. It can provide enough logic for the system in the number of logic gates. The XC2S100 in 144-pin package can provide 103 I/O ports to provide enough I/ for system devices. O port resources.

Regarding the selection of SRAM, considering the resolution of the liquid crystal display is 240 & TImes; 320 pixels, each pixel can display 65 536 colors (16 bits), so the size of the memory is at least 240 & TImes; 320 × 2B = 150 KB. Add a 512 KB SRAM CY7C1041BV33 as the video memory. CY7C1041BV33 can work in the word operation mode to facilitate the display of data access. In the process of refreshing the liquid crystal, each word in the SRAM can correspond to each pixel of the liquid crystal.

Handwriting recognition uses a handwriting recognition microcontroller of the type ePH1200AQ. The ePH1200AQ hardware integrates an 8-bit RISC microcontroller, touch screen driver, interface UART, 4 KB SRAM, 32K word programming ROM and 512K word data ROM; the software includes handwriting recognition kernel, character set and handwriting collection software. When the microcontroller is connected to an external touch screen, it can form a handwriting recognition application such as an SMS, mobile phone or handwriting input device.

3 system software design

System software includes two parts: single chip and FPGA. This article mainly introduces the software design of the MCU part.

The functions completed by the MCU include cyclically querying whether the two serial ports receive new data. When a serial port receives new data, it takes the corresponding meaning. When the character is displayed, the dot matrix data in the Flash ROM is read, converted and processed, and then sent to the FPGA; when the graphic is displayed, the dot is drawn according to the undefined graphic track.

The MCU periodically polls the two serial ports to receive new data in the main program. When any serial port generates an interrupt, according to the meaning of the data received by the serial port, the corresponding operation is taken. The main function flow is shown in Figure 2.

b.JPG

3.1 Character display principle

The file HZK16 and file ASC16 in the UCDOS software are a 16×1 6-character Chinese character dot matrix file and an 8×1 6 ASCII dot matrix file, respectively, and are stored in a binary format. In the file HZK 16, all the Chinese characters in the national standard area code table are stored in order from the small to the largest in the Chinese character area code. Each Chinese character occupies 32 bytes (16×16 Chinese character dot matrix), and each area is 94 Chinese characters. . In the file ASC16, 8×16 ASCII dot matrix is ​​stored in order from ASCII to small, and each ASCII code occupies 16 bytes.

In the text file of the PC, the Chinese characters are stored in the form of the internal code, and each Chinese character occupies two bytes. The first byte is the area code. In order to distinguish it from the ASCII code, the range starts from hexadecimal 0A1H (less than 80H is an ASCII code character), corresponding to the first area of ​​the area code in the location code; the second byte For the bit code, the range also starts from 0A1H and corresponds to the first bit code in a certain area. In this way, the location code of the Chinese character is obtained by subtracting 0A0A0H from the Chinese character internal code. For example, the internal code of the Chinese character "I" is hexadecimal "CED2", where "CE" represents the area code, and "D2" represents the bit code. Therefore, the location code of "I" is 0CED2H-0A0A0H=2E32H. Convert the area code and the bit code to the decimal code Chinese character "I", the location code is "4650", that is, the "room" dot matrix is ​​located at the 50th word position of the 46th area, which is equivalent to the position in the file HZK16. The 32 bytes after the 32×[(46-1)×94+(50-1)]=67136 B are "I" display dot matrix.

Read each byte in turn, read one byte each time, and extract each bit in the byte. If a bit is "1", send two bytes to the pixel corresponding to the bit data. Font color data, such as (0x0000, black); if a bit is "0", the two pixels of the background data are sent to the pixel corresponding to the bit data, such as (0xffff, white). When the 32-byte dot matrix data is sent (the total color data sent is 32B×8dot×2B=512 B), the Chinese character with the background color white and the font color black is displayed on the LCD screen. The display result of the Chinese character "I" is shown in Figure 3.

Our Advantages:High refresh rate: With NOVA control system,no scanning line when photographed;High gray level: 256 RGB each, display 16.7M colors, vivid and perfect video effect;High resolution: The most apparent features of the new generation of LED Display;High Brightness: 6000-8000cd/m2, brightness automatically adjusted;High Quality: CE, RoHs, FCC, IP65, ISO9001 passed + 72 Hours serious testing time;Long life span: over100,000hours, warranty at least 2 years.           

You need = We design: Provide Personal- Customized led offer.

Price Advantage:We have the best competitive price at the market, also have the same even better quality

Quality advantage:From material to finished product, from design to produce, we control all steps,that's the guarantee of the quality and reliability.Better service at same situation, better cooperation at same service.



Billboard LED Display

Billboard Led Display,Advertising Led Display,Led Panel Billboard,Full Color Led Screen

Shenzhen Bako Vision Technology Co., Ltd. , http://www.rentalleddisplays.com