Home >serial lcd display module > DSP-based LCD display and control interface design to achieve
DSP-based LCD display and control interface design to achieve
2011-11-13 by seoer1

Abstract: The main features of the DSP TMS320LF2407-type liquid crystal display module and LCM320240 basic use. Based on this discussion between the DSP and digital LCD display  I / 0 port analog timing hardware interface design, based on the C language are given a specific implementation, and ultimately the DSP and LCM320240 good interface, and the actual system application a success. Meanwhile, for other DSP with LCD interface design and control implementation for reference.

    Keywords: TMS320LF2407; LCM320240; C language; interfaces; DSP; LCD

    1 Introduction

    DSP digital signal processor which is an especially suitable for digital signal processing algorithms of the microprocessor, fast, powerful, widely used in graphics, image processing, speech processing, instrumentation, communications, multimedia and military fields. LCD With low power consumption, low price, low driving voltage, the interface easy, long service life and excellent character and graphics display functions in a variety of graphics, human-computer interaction has been widely used.

    This article will give TMS320LF2407 type DSP (hereinafter referred to as DSP) controls the production of LCM320240 Beijing Albatron LCD hardware and software design examples to illustrate how the DSP control liquid crystal display module. At the same time, because of a system design using C language, so the DSP and other types of LCD interface design and control implementation has some reference value.

    2 TMS320LF2407 Features

    TMS320C2000 family TMS320LF240x series is the latest, powerful DSP, which LF2407 is the most revolutionary product is a high integration, performance, strong DSP, high-performance static CMOS technology, making the power supply voltage is reduced to 3.3V, the controller to reduce the loss; 30MI / s speed of execution makes the instruction cycle time to 33ns. Thereby increasing the controller's real-time control; with up to 41 general-purpose, bidirectional digital I / O pins, can easily achieve a variety of I / O operations; code-compatible with existing 240xDSP controller and peripheral integrated higher, larger program memory, A / D conversion faster.

    3 LCM320240 LCD Profile

    LCM320240 is produced by Beijing Qingyun 320x240 dot matrix LCD module. Containing 7602 Simplified Chinese fonts, support for 4 / 8 6800/8080MPU interface, the power supply (3.3V) and DSP-compatible. This design uses 6800 Timing, 8-bit data in parallel.

    LCM320240 work in two different display modes.

    Text display mode. Built-in 512KB of 16x16 display Chinese font ROM (FontROM), storage 7602 Simplified Chinese standard GB code. Each simplified Chinese character composed of two 8-bit code, see LCM320240 Chinese code correspondence table. Through the characters of the two 8-bit code corresponding to the write data register, the corresponding Chinese characters can be displayed at the current cursor position, character size is 16x16.

    Graphics display mode. It is based on character mapping (bitmap) on the way to fill in DisplayRAM graphical information. When the characters to be displayed is not the size of 16x16, you can set the graphics mode, the LCD through the matrix to extract the necessary software to get the size of the character code table, and then by drawing on the serial graphic LCD.

    By controlling the instruction register [FD] of the LCD in two different modes. The operation of LCM320240 essentially by controlling the RS pin on instruction register and data register read and write operations accordingly.

    4 The hardware design of the interface

    DSP will read and write cycles are often slow input / output device (such as liquid crystal display module, printer, keyboard, etc.) for a visit, usually two ways to resolve between the DSP and the slow device input / output timing match the problem.

    Direct access. Direct access method is to read and write signal line and the DSP device interface control panel leads to a slow read and write signal lines directly connected to the timing of the DSP internal read and write control logic. As the read and write cycle is relatively slow peripherals DSP slow, to make the timing match between the two must also be some timing aspects of the control treatment. A deal is software programming wait state generator, extensions to the external bus cycle a few machine cycles. Due to hardware limitations, this expansion usually is limited, TMS320C2000 family of DSP can only be extended to seven machine cycles. Another approach is to use the DSP READY (external device is ready) pin and hardware extensions to achieve automatically wait outside the state, allowing the DSP to the timing between the device and slow match. Although the bus cycle can be extended to any number of machine cycles, but the need for hardware expansion, increased system design complexity.

    Indirect access. With DSP digital I / 0 devices slow indirect control through software control the DSP I / O port to achieve equipment, timing and slow match. In this way without any hardware extensions can be realized with the timing of slow match between the timing equipment.

    This design uses an indirect access method to achieve the timing between the DSP and LCM320240 match.

    Map resistances are 2kΩ. SLK, SLA, respectively, positive and negative for the LED backlight; Vdd, Vss, respectively, for the LCD power supply and ground; CSl, CS2 chip select signals for the LCD, when low CSl, CS2 is high, LCM320240 in a ready state, ready to accept instructions . LCM320240 of DB0-DB7 and DSP IOPB0-IOPB7 connected for data transfer; IOPE0 connected with RS, when RS is high, DSP access the instruction register, and when RS is low, DSP access the data register. IOPEI and WR (R / W) is connected, when LCM320240 timing for the 6800 series, this pin is read / write signal, said read high action, low for write action; I0PE2 and RD (E) is connected, when the timing for the 6800, EN is the enable signal, active high; IOPE5 set to input mode, connected with BUSY, BUSY pin is high when the controller can not be accessed, DSP must access in front of the controller to do to determine the order of LCM320240 pin low to operate; I0PE6 set to input mode, and INT is connected, this pin can be set to high or low trigger, when the cursor position Segment address register (CPXR) and Segment interrupt address register (INTX) the same value, or the cursor Common address register (CPYR) and the Common interrupt address register (INTY) values ??are the same, an interrupt occurs, triggering the pin; IOPE7 and RST connected, when IOPE7 set to low, and the duration of not less than the specified minimum time 100ms LCM320240 time, LCM320240 reset; VOUT negative voltage for the LCD module's output, LCDV0 operating voltage for the LCD (adjustable LCDVo display can be adjusted values contrast), by adjusting the variable potentiometer, you can adjust the LCD display contrast.

    5 software control

    DSP can be used as assembly language or C language development language for programming, but considering the system's portability and readability of the software, this paper developed in C language as a language, introduced between the DSP and LCM320240 control program implementation.

    First solve the TMS320LF2407 and LCM320240 match between the timing. DSP control LCM320240 timing match is the most critical and most basic problem, and its essence is how to write control procedures LCM320240 the instruction register and data register read and write operations. LCM320240 timing diagram used in 6800 shown in Figure 2. LCM320240 interface timing shown in Table 1.

    Second, the system initialization settings, including DSP and initialize the LCD. DSP and DSP initialization to complete the main LCD is connected to the I / O port function deployment; LCD initialization mainly to complete the work and the LCD display mode settings, needs to be noted: in response to LCD in the LCD initialization once reset operation, the follow-up procedures on the LCD to prepare (source omitted).

    Finally, after the completion of system initialization, based on the actual needs of the system call has been compiled by the timing control program that matches LCM320240 to complete the preparation process of the actual system.

    6 Conclusion

    This paper introduces the DSP control LCM320240 software and hardware implementation of a portable detector has been applied, is running well. Meanwhile, this paper application written in C, with high portability to other types of LCD between the DSP and the software and hardware to achieve a certain reference value.

  keywords:serial lcd display module