Home » News » Technical articles » Small lattice HanXian LCD module and its application
Technical articles
Search
Keyword
Categories

Small lattice HanXian LCD module and its application

2014-03-06 16:02:16 Click:

For a small electronic products such as mobile phone, the man-machine interface to satisfy the requirement of the large amount of information displayed on the one hand, on the other hand, the size of the display screen and the restriction of the volume.Therefore, how to under the condition of the area is limited to show more Chinese characters has become an important problem of this kind of products need to be solved.And to solve the above problems is the most effective approach is to use dot matrix display Chinese characters, so that we can under the same cost and volume display more characters.On the other hand, such electronic products also requires a strong Chinese character input function, so as to meet the needs of the Chinese character input and lookup.
HZ132-64 b30 namely is to use small dot matrix display Chinese characters, it is a 12 x 12 matrix Chinese character display LCD graphic display module.The module also has a built-in advanced T9 pinyin input method, and USES the way of UART interface with MCU control, so intelligent terminals for mobile phones, such as human-computer interaction of large amount of information electronic products provide a good solution.


The performance characteristics of b30. 1 HZ132-64
HZ132-64 b30 main performance characteristics of Chinese character LCD display module is as follows:
Low resolution module for 132 (column) x 64 (line), full screen graphics lattice, Chinese character dot matrix display is the 12 x 12;
Containing low 12 x 12 matrix a, the secondary simplified Chinese characters fonts and 12 x 6 lattice ASC Ⅱ character library;
Low full screen can display the line 10, a total of five rows standard tahoma characters or 20 x 5 ASC Ⅱ character, very suitable for class information terminal display;
Low has a variety of graphics and text display command;
Using serial interface control, the hardware connection is simple;
Embedded advanced T9 pinyin input method, compatible with most cell phones pinyin input method;
Low LCD screen size (mm) : 53.0 (L) x 28.0 (W) x 2.0 (H), display bitmap: 0.26 (L) x 0.28 (W);
Use a single + 5 v power supply, internal can provide negative voltage display driver.
HZ132-64 b30 HanXian module of the row 5 root pin on the top of the module is to give the user the power and the serial data port, will now each pin function specification is as follows:
VCC (1) : 5 v power supply side;
TXD (2) : HanXian module of the serial data output pin;
RXD (3) : HanXian module of serial data input pin, the module during startup, the foot grounding can activate the self-check program, the LCD screen will display the self-check  picture
GND (4) : the ground terminal;
RESET (5) : external RESET pin, high level effectively.

2 user command
General with a debugger via a serial port command control MCU HanXian communication module, the module of serial command accordingly displays or returns the corresponding data, the module of communication format for 9600, n, 8, 1, all of the commands sent to HanXian module begins with "ESC" key value 0 x1b, followed by a command byte code, then followed by the specific capacity in command.Module returns in the content of the "ESC" to start, followed by a command byte code, followed by return.Modules can be automatically returns the response of each instruction to make the success, when performing a successful return "OK!""Error", the wrong instruction.With the data returned by the instruction, the response is usually behind the data.When normal operation module, make it no longer can be set through the proper response to the command line of board to make success, in order to improve the running speed of the modules.
To command format for modules: ESC, command code (1 byte), command content (N bytes);
Module returned data format for: ESC, return content (N bytes).
Detailed below each user command:
(1) set of LCM gray
Format: ESC, 0 x31, HD.
0 x31: gray set command;
HD: grey value, the value range of 0 x00 to 0 x3f, suggest grey value of 0 x07.
(2) the CLS command
The command format: ESC, 0 x32;
(3) set the cursor position
Format: ESC, 0 x33, X, Y;
Where X is in Chinese characters as the unit screen coordinates, value range of 0 ~ 19;Y in Chinese characters as the unit line screen coordinates, value range of 0 ~ 4.


 (4) shows the cursor

Format: ESC, 0 x34, A;
Among them, A switch to the display for the cursor, A is zero, does not show the cursor, to 1, A cursor is displayed.
(5) display the string in the cursor position
Format: ESC, 0 x37, B, N, END;
This command is available in the current cursor position display Chinese character or string of ASC Ⅱ, can also be used to display a single Chinese character or ASC Ⅱ characters.: in the B to display attributes switch, when B is zero, the normal display character, B to 1, reverse video character;N to show the content of the characters (multibyte), when the display content of Chinese characters, N for displaying Chinese characters code;When the display content is ASC Ⅱ yards, N for ASC Ⅱ code value;END to END, its value is 0 x00.
(6) draw points at any position
Format: ESC, 0 x38, C, X, Y;
Draw point, the origin (0, 0) is in the upper left corner, X coordinates, to the right Y increasing downward.Among them: C is to draw some attribute switch, C to 1, the coordinates of the original by drawing a point, C to 0, erase the coordinates of points;Said to point X X coordinate values (0 < X < 131);Y Y for the unit with the point coordinate values (0 < Y < 63).

Draw a line (7) any position
Format: ESC, 0 x39, D, X0, Y0, X1, Y1.
Among them, the D line drawing attributes, for 2 D, draw a dotted line;D to 1, draw a solid line.D to 0, erase the position of the line;The xo is the location of X at the end of the straight line;Y0 Y position at the end of the straight line;The X1 is the location of X at the other end of the straight line;Y1 said Y position on the other end of the straight line.
(8) circle at any position
The command format: ESC, 0 x41, E, X, Y, R.
Among them, the circle is drawn on the said property, E E to 1, draw a circle, E is 0, erase the circle;X X represents a center location;Y Y said a center location;Radius R.
(9) painting pictures
Format: ESC, 0 x42, F, X0Y0, X1Y1, N.
F drawing attributes, 0 F, normal figure, F is 1, draw the graphic display;X0Y0 coordinates for the upper left corner;X1Y1 size for the picture, and the width of the X1  high Y1;N multiple bytes graphic data, arrangement method for lateral 8 bit, byte is right high left low, byte order from left to right, from top to bottom.
(10) ICON
Format: ESC, 0 x43, G, N.
This function is used to display the factory default ICON graphics within modules.Among them: G ICON attribute, G to 1, draw the ICON, G to 0, erase the ICON;N from left to right which one ICO

(11) for digital combination of effective pinyin combination  for T9 pinyin input method
Format: send: ESC, 0 x47, N1, END;
Returns: ESC, N1, X1, END, Xn, END;
Numbers represent the letters of the adoption of international standards: 0 and 1 is invalid, 2  ABC, 3  DEF, 4  GHI, 5  JKL, 6  MNO, 7  PQRS, 8  TUV, 9  WXYZ;
N1  characters that enter the Numbers represent less than or equal to 6 digital, value range is 2 ~ 9, on behalf of the letters in the range of A ~ F;
X1 said the first return of pinyin string (lowercase);
Xn said the first n the pinyin string (lowercase);
(12) and conform to the pinyin input string of characters the  for T9 pinyin input method
Format: send: ESC, 0 x48, N, Xn, N, END;
Returns: ESC, Nx, END.
Among them, N returns the number of Chinese characters;Xn said return what page of the characters n p 1 (for to choose Chinese pages);N1 said input pinyin string  six or less number;Nx said the returned Chinese character string.
If (13) is set to command returns a response
Format: ESC, 0 x50, H;
H for command response properties, H is 00 said not to return to command response, H is 01 indicates when the command executed correctly returns "OK!"When the command is not correct return "error".

Three specific application
HZ132-64 b30 HanXian LCD module can be widely used in human-computer interaction friendly interface, shows that large amount of information in electronic products, due to the control of MCU is through the UART communication with LCD module, so the module can be almost interface with any kind of single chip microcomputer.For does not have UART or UART is occupied by the single chip microcomputer, can make with gm to simulate the serial I/O port line, but the simulation of the serial port baud rate will be subject to the conditions of instruction cycle and can't do is very high, generally only do 4800 BPS, then HanXian module of crystals can be replaced is 11.0592 MHz, at the same time, the baud rate of modules to 4800 BPS, can the normal communication.
Figure 1 is based on AT89C2051 single-chip computer as an example, the given HanXian LCD module with SCM interface circuit.
Here are using C51 language to figure 1 hardware circuit matching subroutine:
# define CR putstring (" \ r \ n ") / / send a carriage returns
8 / / # define OLEN serial send buffer length
Idata uchar outbuf [OLEN];/ / send buffer
Data uchar idata * outlast = outbuf;/ / out finally by interrupt transmission byte position
Data uchar idata * putlast = outbuf;/ / the last byte is put in the send buffer
# define ILEN 30 / / the serial receive buffer length
Idata uchar inbuf [OLEN];Receive buffer
Data uchar idata * inlast = inbuf;/ / the last byte composed of break into the receive buffer
Data uchar idata * getlast = inbuf;/ / the last take byte position
Bit outbufsign0;/ / the last data after sign, after = 0
Bit outbufsign;/ / output buffer is not empty sign, not empty = 1
Bit inbufsign;Sign / / receive buffer is not empty, not empty = 1
Bit inbufful;/ / input buffer full marks, full = 1
/ / in a byte to send buffer
Putbyte (unsigned char c)
{
ES = 0;/ / pause serial port interrupt, to avoid the error when data comparison

While ((((outlast - putlast) = = 2) && (outlast > putlast)) | | (( outlast < putlas
T) && (OLEN - (putlast - outlast) = = 2)))
{

The history of the LCD IC packaging daqo

Copyright © 2014-2015

Shenzhen pingxi Science and technology co., LTD.

All Rights Reserved

TEL:0755-29656362 FAX:0755-29656361

Online Customer Service
  • general manager
    点击这里给我发消息
  • financial
    点击这里给我发消息
  • business
    点击这里给我发消息
  • engineering
    点击这里给我发消息