Board logo

subject: Simple and practical four-line dot matrix LCD drive mode - the electronics industry [print this page]


Simple and practical four-line dot matrix LCD drive mode - the electronics industry

With the rapid development of science and technology,

Electronic Products more and more to the intelligent, small, human, development of low power consumption and so on. The rise of liquid crystal display, for the realization of these requirements possible. LCD screen can be divided into struts, character type,

Lattice Type, or monochrome, color and so on. Most LCD displays are achieved standardization and modular, with common control

Chip (Eg SED1330, SED1520, HD61202, etc) and SCM so simple to connect, but these liquid crystal display module to use more parallel data lines and control lines to connect. In practice, taking into account the cost of the product and size, using parallel data lines and control lines connected, is not very easy to use. Therefore wish to adopt a standard industry bus I2C, SPI and other connections, but these products are very rare. This clever use of the characteristics of liquid crystal display module, using a 74LS164 four lines of LCD control circuit is simple and practical.

1 dot matrix LCD Module Description

This article describes a use SED1520 chip control 122 32 dot matrix LCD display, which is mainly driven by the row / column driver, and 122 32 full dot matrix liquid crystal display component, complete graphics can also be show seven and a half (16 16 dot matrix) character. Main technical parameters and display characteristics are as follows:

Power supply : VDD to +3 V ~ +5 V; LCD external voltage VDD-VLCD = 5.0V.

Display: 122 (columns) 32 (row) points.

Display color: yellow-green bottom blue. ? Display angle: 6 o'clock in the open heart.

STN address the reflective mode. ? Drive mode: 1 / 32 Duty, 1 / 6 Bias.

Drive current: Maximum 240 A. LCD module driver schematic shown in Figure 1.

LCD Module pin features shown in Table 1.

Some send the command table shown in Table 2.

2 4 line dot matrix LCD driver circuit

Four-line dot matrix LCD driver circuit shown in Figure 2.

System uses a 74LS164 to string in and out the way dot-matrix liquid crystal display module FM12232C connection, through the four signal line (SDA serial data line, CLK/A0 serial clock line of the LCD module The A0 data / command control line, E1 line the main driver chips enabled, E2 Enable line from the driver chip) to achieve dot matrix LCD driver. And liquid crystal display module provides the circuit connection compared to four lines and MCU 2051 connected by at least seven mouth lines, so that saves a small electronic products, precious microcontroller port line resources, make products more personalized and intelligent.

LCD control instructions according to procedures known in time, as long as the data is written on the module command module while maintaining adequate operational delay, you can not check the module status, to achieve direct control. Dot matrix liquid crystal display corresponds to a point in a memory, set bit is displayed, clear not show, so long as the corresponding data bits can control the LCD display control. LCD display data stored by paging (memory division, please refer to the relevant information).

Data transfer, first select the Enable client "E1" or "E2", send data to the 74LS164, and then send a command / data select signal "A0", close to be able to end the transmission of data and instructions to make liquid crystal screen display graphics or characters, etc..

3 software Software using assembly language. Due to space constraints, only send commands and data to the LCD module, subroutine, and character through the process of initialization and show how to use the subroutine. Chinese characters on the display subroutine, a string of other shows, animation, graphics and fonts in Windows, and the graphics library extraction procedures, if necessary, please contact the author.

Source code is as follows: Sda bit p1.7; definition of sda line

Clk bit p1.6; defined clk line

E1 bit p1.5; definition of master enable

E2 bit p1.4; definition of slave enable

A0 bit p1.6; define the data / instruction select line

Outmi:; send display instructions to the master SED1520

Setb e1; master enable Clr e2; slave close Lcall trndata; send a byte Clr a0; set this byte instruction

Clr e1; master Close Ret Outsi:; send display commands to the slave SED1520

Setb e2 Clr e1 Lcall trndata Clr a0 Clr e2 Ret Outmd:; to send display data to the master SED1520

Setb e1 Clr e2 Lcall trndata Setb a0 Clr e1 Ret Outsd:; to send display data to the slave SED1520

Setb e2; slave enable Clr e1; master Close Lcall trndata; send a byte Setb a0; set this byte to display data

Clr e2; slave close Ret Trndata:; send a byte to LCD module

Push a; save the original data

Setb sda; sda Line Set Setb clk; clk Line Set Mov r7, # 08h Trn_loop: Rlc a Clr clk Mov sda, C

Setb clk Djnz r7, trn_loop Pop a; to restore the original data

Ret Init:; initialize the LCD module

Mov a, # 0e3h; LCD reset Lcall outmi Lcall outsi Mov a, # 0aeh; off show

Lcall outmi Lcall outsi Mov a, # 0a4h; dynamic drive

Lcall outmi Lcall outsi Mov a, # 0a9h; refresh rate option 1 / 32

Lcall outmi

Lca




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0