LCD display (LCD) has a display information rich, Graphic LCD Display low power consumption, small size, light weight, ultra-thin and many other displays can not match the advantages of the past few years has been widely used in single-chip control of intelligent instruments, instruments and low-power electronics Product. LCD can be divided into segment-type LCD, character LCD and dot matrix LCD. Among them, Graphic LCD Display the segment type LCD and character LCD can only be used for simple display of characters and numbers, can not meet the graphics curve and Chinese characters display requirements; and dot matrix LCD can not only display characters, numbers, can also display a variety of graphics, And Chinese characters, and can achieve the screen up and down left and right scrolling, animation, partition window, reverse, flashing and other functions, the use of a wide range. Graphic LCD Display This paper introduces the dot matrix LCD display HS12232-1, HS12232-9 interface with the microcontroller and programming methods, while giving two kinds of display commonly used character display and Chinese characters display program.
First of all to use dot matrix graphics LCD display. (For example, a line of 240 points, the total number of 128 points, can accommodate 16 × 16 dot matrix Chinese characters 15 [because 240/16 = 15], 128 columns can display 8 lines [because 128/16 = 8]), Guangzhou Qianxi Technology Development Co., Graphic LCD Display Ltd. HS12232-1 built-in SED1520 drive controller lattice is 122 × 32 points, each line of seven and a half Chinese characters, a total of 2 lines. If you want to expand the memory, all GB 16 × 16 dot matrix Chinese characters, 8 × 16 dot matrix ASCII dot matrix data and Chinese character encoding data to use a 512KB of memory to store, more part can be reserved for data storage. This article only discusses the LCD interface with the microcontroller part of the expansion of the memory part of the slightly. The following gives HS-12232-1 and a microcontroller 8031 interface
GB2312-80 contains a total of Chinese characters, graphic symbols, etc. a total of 7445, of which 6763 Chinese characters, according to the frequency of the use of Chinese characters is divided into two levels, including a Chinese characters 3755, two Chinese characters 3008. Chinese characters, Graphic LCD Display graphic symbols according to their location will be divided into 94 "area", each district contains 94 Chinese characters, each character is also known as "bit". The "area" of the serial number from 01 to 94 area, "bit" of the serial number from 01 to 94. If the "bit" is indicated in the horizontal direction and the "area" is the vertical, the "area" and "bit" form a two-dimensional coordinate. Given a "zone" value and a "bit" value, you can determine a unique Chinese character or graphic symbol. That is, four Arabic numerals can uniquely determine a Chinese character or symbol. Such as "North" word code is "1717", and Beijing word code is "3009". The first two are "zone" number, the latter two are "bit" number. Graphic LCD Display Which 1 to 15 area is a variety of graphic symbols, tabs and some major countries of the language letters, 16 to 87 areas are Chinese characters, of which 16 to 55 is a level of Chinese characters, 56 to 87 is a secondary Chinese characters.
HS12232-9 serial interface with the microcontroller timing, that is, 24 clock pulses to send a byte. The microcontroller first sends the data transmission start bit 5 "1", HS12232-9 received five consecutive "1", the internal transmission is reset, while the serial transmission is synchronized, Graphic LCD Display followed by the RW bit used to determine the data transmission Direction (read or write), RS is used to select whether it is an internal data register or an instruction register, and bit 8 is fixed to "0". After receiving the first byte consisting of the start bit, RW, RS, "0", a byte of data or instruction is divided into two bytes for serial transmission or reception. The upper 4 bits of the data or instruction are placed in the upper 4 bits of the second byte of the serial data, Graphic LCD Display the lower 4 bits are 4 "0", the lower 4 bits of the data or instruction are placed in the third byte The data of the high 4, 4 low 4 "0", so that the completion of a byte or data transmission. HS12232-9 internal no send / receive buffer, send rhythm to pay attention, or to throw instructions or data.