Design of Interface between DSP and Intelligent Color LCD Display

Publisher:haoyingLatest update time:2014-07-13 Source: 21ICKeywords:DSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, with the emergence of low-cost, high-performance DSP chips, DSP has been increasingly used in high-speed signal acquisition, voice processing, image analysis and processing, and has shown great superiority. Intelligent color LCD displays have the characteristics of direct and beautiful display and easy operation, and are used as display front ends of various portable systems. It generally uses an industrial-grade high-frequency CPU to process the received commands and data by itself, thus improving the software development efficiency of the user-side interface.

The general LCD display is often controlled by a single-chip microcomputer. However, when the system requires a large amount of high-speed real-time data, the single-chip microcomputer is unable to cope with the processing speed. In addition, the general LCD display still uses cumbersome dot matrix operations to display Chinese characters and graphics, which increases the difficulty of software development. In order to solve these problems, this paper will propose an interface design method for an intelligent color LCD display based on DSP control, which effectively solves the above problems.

 

1.jpg

1 Introduction to VK63 Intelligent Color LCD Display

Intelligent color liquid crystal display (hereinafter referred to as LCD) VK63 is a product of Shanghai Broadcasting and Television Group Beijing Branch. It has the characteristics of small size, low power consumption, no auxiliary radiation, long life, ultra-thin, vibration-proof and explosion-proof. The display color of this display is 256 colors, and the characters that can be displayed are the secondary font library of ASC11. The Chinese display is 15 rows × 20 columns, and the graphic dot matrix is ​​320 × RGB × 240.

The LCD uses a large-scale gate array integrated circuit, thus avoiding the use of cumbersome dot matrix operations to display Chinese characters and graphics, reducing the burden on software developers and improving development efficiency; due to the full digital design, the display is stable and reliable, and it is resistant to strong electromagnetic interference; the LCD uses an industrial-grade CPU (89C51), and is equipped with a secondary character library. It can receive control command data through the serial port or the three-state data bus parallel port, and process the received commands and data by itself to display various curves, graphics, and Chinese and Western fonts that the user wants to display in real time. Its principle block diagram is shown in Figure 1.

The command code of LCD is in hexadecimal format, and each command starts with "1B" in hexadecimal code, followed by the command code and required parameters. XH represents the high 8 bits of the X coordinate, XL represents the low 8 bits of the X coordinate, YH represents the high 8 bits of the Y coordinate, and YL represents the low 8 bits of the Y coordinate.

The LCD graphics mode uses light dots as the smallest dot matrix display unit, and each light dot contains three color dots of RGB. The character mode uses 8×16 dot matrix as the smallest display block unit. Western characters occupy one display block, and 16×16 dot matrix Chinese characters occupy two display blocks. After each character or Chinese character is displayed on this machine, the cursor automatically moves right by one character or Chinese character position, so when writing Chinese characters or characters sequentially in the same line, there is no need to add cursor positioning commands, and the internal code can be continuously input.

 

2.jpg

If the graphic operation is to draw a solid rectangle, then the command code is: 1B 41 color XH1 XL1 YH1 YL1 XH2 XL2 YH2 YL2, where color is the color code, X1 Y1 is the upper left corner coordinate, and X2 Y2 is the lower right corner coordinate. The specific operation is to use the point (X1, Y1) as the upper left corner coordinate, the point (X2, Y2) as the lower right corner coordinate, and use the specified color to draw a solid rectangle.

2 Serial communication design between DSP and LCD

2.1 Hardware Design of Serial Communication

The LCD uses a standard RS-232 communication interface and works in serial mode. One frame of information is 10 bits, including 1 start bit (0), 8 data bits (low bit first, high bit later), and 1 stop bit (1).

In order to improve the communication speed, a 128-byte input buffer is set in the display. Before sending data, the DTR signal (RS232 level) should be checked first. If DTR is negative (corresponding to COMS high level), it means that the buffer is full, and data should be sent after the DTR signal becomes positive (corresponding to COMS low level). If the amount of data in each group is less than 128 bytes and there is enough interval between each group, data can be sent continuously without judging the DTR signal. Figure 2 shows the principle block diagram of its hardware interface.

 

3.jpg

2.2 Serial communication software design

This design is a program for the LCD display of a specific engineering project (reactive power and harmonic compensation device). It mainly displays various color graphics and texts to show whether the system is working and whether it is working normally. The values ​​of the display flag register and the COUNT data register are given by the relevant application program. By setting the wait register WSGR (assigned to 0) and detecting the DTR signal of I/O, data transmission loss can be prevented, thereby realizing the communication between the high-speed DSP and the external low-speed LCD. Due to limited space, only the serial initialization and data transmission part of the program are given here. The program flow chart is shown in Figure 3.

1)Serial communication initialization program

LDP # 0E0H ; Set the serial communication port registers

SPLK # 0017H, SCICCR; SCI enable, idle line wake-up mode, 8-bit data, no parity bit

SPLK # 0013H, SCICTL1; receive, send, internal clock enable, SLEEP = 0

SPLK # 0000H, SCICTL2; Receive and send interrupts disabled

SPLK # 0000H, SCIHBAUD

SPLK # 0082H,SCILBAUD; baud rate is 9600

SPLK # 0020H, SCIPC2; Set SCITXD to serial transmission function, SCIRXD to I/O port function

SPLK #0033H,SCICTL1;Serial port initialization completed

LAR AR0,#SCITXBUF ; send buffer register address

2) Data serial transmission program

SCISS:

LDP #0E0H

BIT SCIPC2, BIT3; Detect DTR signal to determine whether the input buffer is full

BCND SCISS,TC; If the buffer is full, continue to query and wait

LDP #4H; DP points to user defined data page 4 (0200H-0280H)

LACL SCITEMP

MAR *,AR0; data is sent to SCITXBUF sending buffer

SACL *

XMIT_RDY:

LDP#0E0H

BIT SCICTL2BIT7; Check if the transmitter is empty

BCND XMIT_RDY,NTC

RET

 

4.jpg

3 Parallel communication design between DSP and LCD

3.1 Parallel Communication Hardware Design

The LCD itself has a three-state data bus parallel port (the parallel port is COMS level) and can communicate with the host. It has 12 external lines connected to the DSP, namely D0~D7, WRCS, BUSY, INT and GND. Among them, WRCS is the logical OR of the chip select signal and the write signal, and the rising edge is valid. The BUSY signal is high (COMS level) to indicate busy. INT is the interrupt request signal, and the low level is valid. Figure 4 shows the hardware schematic diagram of its parallel interface. Figure 5 shows the timing diagram of the LCD. Among them, TW is the pulse width of the WRCS signal, TSU is the data setup time, and TH is the data hold time. The specific requirements for these parameters are:

TW is not less than 16ns; TSU is not less than 12ns; T is greater than 0ns; TH is not less than 5ns; TI is not less than 2μs.

3.2 Parallel Communication Software Design

The programming concept of parallel communication is basically the same as the design of serial communication software. However, parallel communication prevents the loss of transmitted data by setting the wait register WSGR to 0 and detecting the BUSY signal of IOPC5 to achieve communication between high-speed DSP and external low-speed LCD. The flowchart shown in Figure 3 is also applicable to parallel communication.

1) Parallel communication initialization program

LDP#0E1H

LACL OCRB

AND # 00CFH ;IOPC (4-5) is configured as general I/O function

SACL OCRB

LACL PCDATDIR

OR # 1000H; IOPC4 port is output mode

SACL PCDATDIR

LACL PCDATDIR

AND # 0DFFFH; IOPC5 port is input mode

SACL PCDATDIR

2) Data parallel transmission program

SCISS: ; Determine whether the BUSY signal of IOPC5 port is busy

LDP#0E1H

LACL PCDATDIR

LDP#4H

SACL BUSYDATA

BIT BUSYDATA, BIT5

BCND SCISS, TC; If BUSY is high, continue to query and wait

LDP # 4H; If BUSY is low, send data to port 8000H.

OUT PARALTEMP,8000H

LDP#0E1H

LACL PCDATDIR

AND # 0FFEFH ; Set the INT signal of IOPC4 port to low

SACL PCDATDIR

RPT # 50; Delay 2.5μs

NOP

LDP#0E1H

LACL PCDATDIR

OR #0010H ; Set the INT signal of IOPC4 port high

SACL PCDATDIR

RET

 

5.jpg

4 Conclusion

The intelligent color LCD interface design based on DSP control proposed in this paper can well solve the communication problem between high-speed DSP and external low-speed devices. This design attempts to adopt two communication schemes, serial and parallel. In the former, DSP only needs 3 wires to realize data serial communication, thus saving the external resources of DSP. Although the transmission speed is slightly lower, it can meet the needs of most practical projects. While the latter adopts parallel communication, although the data transmission speed is faster, it will be limited by the speed of interpreting commands by the CPU (89C51) of LCD. Although the LCD display speed is about 20% faster than the former, it will occupy 12 wires of DSP external resources. Through the comparison of the above two schemes, the final design project adopts the serial communication scheme, and has achieved good results in practical applications.

Keywords:DSP Reference address:Design of Interface between DSP and Intelligent Color LCD Display

Previous article:Design of TMS320C6455 DSP based on external FLASH automatic loading
Next article:Design of IED for Smart Substation Power Grid Based on DSP and CPLD

Recommended ReadingLatest update time:2024-11-23 13:48

STM32f4---TFTLCD display experimental code (04)
   //Pin multiplexing mapping settings    GPIO_PinAFConfig(GPIOD,GPIO_PinSource0,GPIO_AF_FSMC);//PD0,AF12    GPIO_PinAFConfig(GPIOD,GPIO_PinSource1,GPIO_AF_FSMC);//PD1,AF12    GPIO_PinAFConfig(GPIOD,GPIO_PinSource4,GPIO_AF_FSMC);    GPIO_PinAFConfig(GPIOD,GPIO_PinSource5,GPIO_AF_FSMC);      GPIO_PinAFConfig(GPIOD,GPIO
[Microcontroller]
Design of Inverter Power Supply Based on ARM7 and DSP
introduction Today, with the development of electrical intelligence everywhere, countless power-consuming occasions cannot do without the Inverted Power Supply System (IPS) to provide stable and high-quality power for on-site equipment, especially in occasions such as communication rooms, server work
[Power Management]
Design of Inverter Power Supply Based on ARM7 and DSP
21. TFTLCD 2.8-inch principle and instruction introduction
2.8-inch TFT control chip ILI9341 1. Introduction to TFTLCD 2.8-inch TFTLCD module driver IC is ILI9341 2. Features of 2.8-inch TFTLCD module 2.8-inch TFTLCD schematic diagram: 2.8-inch TFT interface description Introduction to 16-bit Parallel Port Driver 2. TFTLCD driving principle and process
[Microcontroller]
21. TFTLCD 2.8-inch principle and instruction introduction
JSR, the leading photoresist manufacturer, will close its Taiwan factory and withdraw from some LCD material markets
According to Yahoo News, in response to changes in the market environment, JSR Corporation, the world's leading photoresist manufacturer, announced that it will withdraw from some LCD material markets, close its factories in Taiwan, reduce production capacity in South Korea, and lay off employees in both regions. JSR
[Mobile phone portable]
STM32F4——TFT-LCD principle and FSMC
1. Introduction:     TFT-LCD stands for Thin Film Transistor Liquid Crystal Display. There are many categories according to their size, resolution and driver chip. The following will introduce the 2.8-inch 320X240 resolution TFT-LCD driven by ILI9341 chip. 2. Interface:     The module uses 16-bit parallel connection w
[Microcontroller]
Research on Dual-CPU Servo Controller Based on AT89C51+DSP
1 Introduction In recent years, with the continuous progress of manufacturing industry, modern manufacturing industry has higher and higher requirements for precision, accuracy, high speed and automation. Most of the traditional motion controllers use 8051 series 8-bit single-chip microcomputers. Although this singl
[Microcontroller]
Research on Dual-CPU Servo Controller Based on AT89C51+DSP
Learn 51 MCU from me (Part 7) - LCD1602 Liquid Crystal Display Module
  The previous issue of this magazine introduced the circuit and program design method of the single-chip microcomputer to capture the infrared remote control decoding method, and gave an example. This lecture will introduce the single-chip microcomputer to drive the LCD1602 liquid crystal display module. Through this
[Microcontroller]
Learn 51 MCU from me (Part 7) - LCD1602 Liquid Crystal Display Module
Design of Digital Control Delay Device Based on Field Programmable Gate Array
1 Introduction The use of hardware description language combined with programmable logic devices (PLD) can greatly facilitate the design of digital integrated circuits. This paper introduces a digital control delay device designed using VHDL hardware description language combined with field programmable gat
[Embedded]
Design of Digital Control Delay Device Based on Field Programmable Gate Array
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号