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 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.
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.
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 SCICTL2BIT7; Check if the transmitter is empty
BCND XMIT_RDY,NTC
RET
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
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.
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
- "Cross-chip" quantum entanglement helps build more powerful quantum computing capabilities
- Why is the vehicle operating system (Vehicle OS) becoming more and more important?
- Car Sensors - A detailed explanation of LiDAR
- Simple differences between automotive (ultrasonic, millimeter wave, laser) radars
- Comprehensive knowledge about automobile circuits
- Introduction of domestic automotive-grade bipolar latch Hall chip CHA44X
- Infineon Technologies and Magneti Marelli to Drive Regional Control Unit Innovation with AURIX™ TC4x MCU Family
- Power of E-band millimeter-wave radar
- Hardware design of power supply system for automobile controller
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Application of Direct Digital Synthesis Circuit in Radar Signal Design
- Share: Current status of wireless charging
- [IMX6UL Development FAQ] How to tailor kernel make menuconfig and how to add new devices?
- SA57022-XX 500mA LDO.rar
- Synchronous fifo read and write enable problem
- Why can an oscilloscope probe measure a 20ms period sine wave on a human hand?
- MSP430 IO and internal structure diagram
- 89c51 and USB flash drive
- Power Engineer's Handbook - Collection of Various Filter Circuits 2
- MSP430 Registers