Abstract: Introduces TMS320LF2407 DSP the main feature and the LCM320240 liquid crystal display module basic application method. Based on this discussed DSP and between the liquid crystal display monitor uses the digital I/0 mouth simulation succession the hardware interface design proposal, gave concretely has realized the method based on the C language, has realized DSP and the LCM320240 good connection finally, and has obtained the success in the actual system application. At the same time, may realizes for other DSP and the LCD connection design and the control provides the reference.
Key word: TMS320LF2407; LCM320240; C language; Connection; DSP; LCD
1 introduction
DSP is the digital signal processor, is one kind is suitable specially for the digital signal processing operation microprocessor, the speed is quick, function, widely applies in the graph imagery processing, pronunciation processing, the instruments and meters, the correspondence, multimedia and domains and so on military. Because the liquid-crystal display has the power loss to be low, the price is low, the slaving voltage is low, the connection is convenient, service life long and so on characteristics as well as superior character and graphical display function, in each kind of graphical display, in the man-machine interaction obtains the widespread application.
This article will give TMS320LF2407 DSP (to hereafter refer to as DSP) to control the LCM320240 liquid crystal display monitor’s software and hardware design example which Beijing Blue Cloud Company produces, how explains through the DSP control liquid crystal display module. At the same time, because the procedure uses the system design C language, therefore realizes to other model’s DSP and the LCD connection design and the control also has certain reference value.
2 TMS320LF2407 main features
The TMS320LF240x series is in the TMS320C2000 family is newest, function formidable DSP, LF2407 most has the revolutionary product, is a section of integration rate is high, performance strong DSP, uses the high performance static state CMOS technology, causes the power line voltage to reduce to 3.3V, reduced controller’s loss; 30 MI/s carries out the speed to cause the instruction cycle to reduce to 33 ns., thus sharpened controller’s real-time control ability; Has reaches 41 general, the bidirectional digital I/O pin, can realize each kind of I/O operation conveniently; Is compatible with the extant 240xDSP controller code, and the peripheral device integration rate is higher, the program memory capacity to be bigger, a/D conversion rate to be quicker.
3 LCM320240 liquid-crystal display synopsis
LCM320240 is 320×240 which Beijing Blue Cloud Company produces the lattice LCD module. Contains 7 602 simplified Chinese font, supports 4/8 6800/8080 MPU connection, works the power source (3.3 V) and DSP is compatible. In this design uses 6800 successions, 8 bit data parallel modes.
LCM320240 work in two kind of different display modes.
Writing display mode. In constructs 512 KB 16×16 Chinese demonstration font ROM (Font ROM), saves 7 602 standard GB code simplified Chinese. Each simplified Chinese character is composed of two 8 codes, the corresponding relationships see also a LCM320240 Chinese generation of stopwatch. Through two 8 codes which corresponds the Chinese character read in the material register, may correspond the Chinese character demonstration in the current cursor place, the Chinese character size is 16×16.
Cartography display mode. It is (bit map) the way fills in the graph material by the character mapping on Display RAM. When must demonstrate when the Chinese character size is not 16×16, may establish LCD as the cartography pattern, obtains through the matrix extraction software needs the size the Chinese character character stopwatch, again on LCD plotting mode demonstration.
Through controls its instruction register [FD] to realize LCD to cut between these two kind of different patterns. Materially is through controls the RS pin to the LCM320240 operation carries on the corresponding read-write operation to the instruction register and the material register.
4 connection hardware designs
DSP will read and compare the write cycle slow input/output unit (for example liquid crystal display module, printer, keyboard and so on) to carry on the visit frequently, usually will solve DSP and between these slow equipment’s input/output succession match question with the following two methods.
Direct visit. The direct access mode is the read-write holding wire which draws out the DSP read-write holding wire and the idling speed equipment interface control panel direct connected, succession by DSP interior read-write logical control. Because slow peripheral device’s read-write cycle relative DSP is slow, must make both’s succession match, but must carry on some succession aspect control processing. One processing method is the software programming waiting status generator, expands the external bus cycle to several machine cycles. As a result of the hardware condition’s limit, this kind of expansion usually is also limited, TMS320C2000 series DSP are most can only expand to 7 machine cycles. Another processing method is (external instrumentation is ready) the pin using DSP READY, expands through the hardware realizes the exterior condition to wait for automatically, thus causes DSP and between the slow equipment’s succession match. Although may expand the bus cycle to willfully the machine cycle, but needs to carry on the hardware to expand, increased the system design order of complexity.
Indirect visit. With the DSP digital I/0 indirect operation idling speed equipment, realizes through the software control DSP I/O mouth with the slow equipment’s succession match. This way does not need the hardware to expand then realizes with the arbitrary sequence idling speed equipment’s between succession match.
This design uses the indirect access mode to realize between DSP and the LCM320240 succession match. Interface circuit as shown in Figure 1.

In the chart the resistance size is 2 kΩ. SLK, SLA respectively is the LED back light source positive and negative extremely; Vdd, Vss respectively is the LCD power source and the place; CSl, CS2 is LCD selects patches or strips of land as worth saving for seed the signal, when CSl is low, CS2 is when is high, LCM320240 is at the ready state, momentarily may accept the instruction. LCM320240 DB0-DB7 and DSP IOPB0-IOPB7 are connected, realizes the data transfer; IOPE0 and RS are connected, when RS is high, DSP deposit instruction register, but when RS is low, DSP deposit material register. IOPEI with WR(R/W) connected, when LCM320240 is 6800 series successions, this pin for read/write signal, when high level expressed read movement, when low level indicated reads in movement; I0PE2 and RD(E) are connected, when is 6800 successions, EN is enables the signal, the high level is effective; IOPE5 establishes as the input mode, is connected with BUSY, when BUSY pin for high level, the controller is unable to deposit and withdraw, DSP must, in makes the deposit before the controller to determine that this pin only then may carry on the operation for the low level to LCM320240; I0PE6 establishes as the input mode, is connected with INT, this pin may suppose Cheng Gaohuo low level triggering, when cursor Segment address register (CPXR) and Segment interrupt the address register (INTX) value to be the same, or cursor Common address register (CPYR) and Common interrupt when the address register (INTY) value is the same, occurs interrupts, triggers this pin; IOPE7 and RST are connected, when IOPE7 establishes as the low level, and the duration is not smaller than LCM320240 time stipulation smallest time 100ms, LCM320240 repositions; VOUT is the liquid crystal module negative voltage output, LCD V0 is the LCD working voltage (adjusts LCD Vo the value to be possible to adjust demonstration contrast gradient), through the adjustment invariable potentiometer, may adjust the liquid crystal box the demonstration contrast gradient.
5 software controls realize
DSP may use the assembly language or the C language carries on the programming as the development language, but considered system’s probability and software’s readability, this article takes the development language by the C language, introduces between DSP and LCM320240 control procedure realization.
First solves between TMS320LF2407 and the LCM320240 succession match. The succession match is DSP controls LCM320240 most to be essential is also the most basic question, how does its essence is compile the control procedure carries on the read-write operation to the LCM320240 instruction register and the material register. LCM320240 uses 6800 succession chart as shown in Figure 2. LCM320240 connection succession as shown in Table 1.

Then may compile and the succession match DSP control procedure according to the LCM320240 succession chart and the succession table. Take writes the instruction register and writes the material register procedure as the example, the procedure source code is as follows:




Next, carries on the system initialization establishment, including DSP and LCD initialization. The DSP initialization mainly completes DSP and LCD the connected I/O mouth function disposition; The LCD initialization mainly completes to the LCD working and the display mode establishment, needs to point out specially: Deals with LCD in the LCD initialization to carry on a replacement operation, for following carries on the operation sequence to LCD to prepare for (source code omitted).
Finally, after completing the system initialization, according to the actual system’s need, through the transfer already translated the good succession match the LCM320240 control procedure to complete to the reality system program compilation.
6 concluding remark
In the article introduced DSP controls LCM320240 the software and hardware to realize the method to obtain the application in the portable instrumentation, the movement effect is good. At the same time, this article uses the procedure to use the C language compilation, has the high probability, realizes to between other type’s DSP and the LCD software and hardware has certain reference value.