spi lcd module lcd12864 made in china

I2C_LCD is an easy-to-use display module, It can make display easier. Using it can reduce the difficulty of make, so that makers can focus on the core of the work.

We developed the Arduino library for I2C_LCD, user just need a few lines of the code can achieve complex graphics and text display features. It can replace the serial monitor of Arduino in some place, you can get running informations without a computer.

More than that, we also develop the dedicated picture data convert software (bitmap converter)now is available to support PC platform of windows, Linux, Mac OS. Through the bitmap convert software you can get your favorite picture displayed on I2C_LCD, without the need for complex programming.

spi lcd module lcd12864 made in china

This LCD module uses a 128x64 liquid crystal display that support Chinese character , English characters and even graphics. It can exhibit 4 lines and 12 English characters/6 Chinese characters per line. It is suitable for interactive work with Arduino.

The following sample is working under SPI mode. It demonstrates how to display integers on the LCD scrren. You will need the Arduino Library which can be downloaded here.

spi lcd module lcd12864 made in china

The 128X64 with Chinese character library is a dot matrix graphic LCD module with 4-digit/8-bit parallel, 2-wire or 3-wire serial interface, and internal Chinese GB first-level and second-level simplified Chinese fonts; The rate is 128 & TImes; 64, 8192 16*16 dot Chinese characters, and 128 16*8 dot ASCII character sets. The use of this module"s flexible interface method and simple and convenient operation instructions can constitute a full Chinese human-computer interaction graphical interface. Can display 8 & TImes; 4 lines of 16 & TImes; 16 lattice characters. Graphic display can also be completed. Low voltage and low power consumption are another significant feature. The liquid crystal display scheme composed of this module is much simpler than the same type of graphic dot matrix liquid crystal display module, regardless of the hardware circuit structure or the display program, and the price of the module is also slightly lower than that of the graphic liquid crystal module of the same dot matrix. .

● Busy flag: The BFBF flag provides internal operating conditions. BF=1 indicates that the module is performing internal operations. At this time, the module does not accept external instructions and data. When BF=0, the module is ready to accept external instructions and data at any time. With the STATUSRD instruction, BF can be read to the DB7 bus to verify the module"s operating status.

● Font generation ROM (CGROM) Font generation ROM (CGROM) provides 8192 This trigger is used to control the on-screen display of the module. DFF=1 is DISPLAY ON, DDRAM content is displayed on the screen, DFF=0 is DISPLAY OFF. The status of the DFF is controlled by the commands DISPLAYON/OFF and RST signals.

● Display data RAM (DDRAM) module internal display data RAM provides 64 x 2 bytes of space, up to 4 lines of 16 words (64 words) in the Chinese font display, when written to the display data RAM, Display the fonts of CGROM and CGRAM respectively; this module can display three types of fonts, which are half-width alphanumeric (16*8), CGRAM font, and Chinese font of CGROM. The choice of three fonts is based on the DDRAM. In the encoding option written in Chinese, the custom font of CGRAM will be selected in the encoding of 0000H-0006H (the codes thereof are respectively 0000, 0002, 0004, and 0006), and the half-width alphanumeric characters will be selected in 02H-7FH encoding. The font, as for the code above A1 will be automatically combined with the next byte, and the encoding of the two bytes forms the Chinese character code BIG5 (A140-D75F), GB (A1A0-F7FFH).

This module provides a hardware cursor and flicker control circuit that specifies the cursor or blink position in the DDRAM by the value of the address counter.

1. Preparation before use: Apply the working voltage to the module first, and then adjust the contrast of the LCD according to the connection method in the figure below so that it shows a black bottom image. This process can also initially detect whether the LCD segment is missing.

2. Character display: 128X64-0402B with Chinese character library can display 4 rows and 8 columns of 32 characters with 16 16 dot matrix per screen. Each display RAM can display 1 Chinese character or 2 16×8 lattice full heights. ASCII characters, which can display up to 32 Chinese characters or 64 ASCII characters per screen. The 128X64-0402B with Chinese font library internally provides a 128 x 2 byte character display RAM buffer (DDRAM). The character display is achieved by writing character display codes into the character display RAM. Depending on the contents of the writing, the contents of CGROM (Chinese font library), HCGROM (ASCII font font), and CGRAM (custom font) can be displayed on the LCD screen. Three different characters / font selection code range: 0000 ~ 0006H (the code is 0000,0002,0004,0006 a total of 4) display custom font, 02H ~ 7FH display half-width ASCII code character, A1A0H ~ F7FFH shows 8192 GB2312 font fonts. The character shows the address 80H to 9FH of the RAM in the liquid crystal module. The address of the RAM displayed by the character has a one-to-one correspondence with the 32-character display area. The correspondences are shown in the following table.

2 The process of displaying ASCII characters is the same as the process of displaying Chinese characters. However, when displaying continuous characters, you only need to set the display address once. The module automatically adds 1 to the next character position. Otherwise, the displayed character will have an empty ASCII character position.

4 Before the module receives the instruction, the processor must first confirm that the module is in an unbusy state. That is, when the BF flag is read, BF must be “0” to accept the new instruction. If the BF flag is not checked before sending an instruction, it must be delayed a long time between the previous instruction and the instruction, that is, waiting for the previous instruction to determine that the execution is completed. For the instruction execution time, refer to the instructions execution time description in the instruction table. 5 "RE" is the selection control bit for the basic instruction set and extended instruction set. When "RE" is changed, the subsequent instruction set will remain in the last state unless the "RE" bit is changed again. When using the same instruction set, it is not necessary to reset the "RE" bit each time.

/* Description: Realize the communication protocol between LCD and MCU, and perform human-computer interaction according to the commands issued by the computer */

spi lcd module lcd12864 made in china

Ordinary LCDs can only display simple text or numbers within a fixed size. But in 128×64 graphical LCD display, there is 128×64 = 8192 dots, which is equivalent to 8242/8 = 1024 pixels. So, it can display not only simple text or numbers within a fixed size but also simple graphics.

//U8GLIB_SSD1351_128X128_332 u8g(13, 11, 8, 9, 7); // Arduino UNO: SW SPI Com: SCK = 13, MOSI = 11, CS = 8, A0 = 9, RESET = 7 (http://electronics.ilsoft.co.uk/ArduinoShield.aspx)

//U8GLIB_SSD1351_128X128_332 u8g(76, 75, 8, 9, 7); // Arduino DUE: SW SPI Com: SCK = 13, MOSI = 11, CS = 8, A0 = 9, RESET = 7 (http://electronics.ilsoft.co.uk/ArduinoShield.aspx)

//U8GLIB_SSD1351_128X128_332 u8g(8, 9, 7); // Arduino: HW SPI Com: SCK = 13, MOSI = 11, CS = 8, A0 = 9, RESET = 7 (http://electronics.ilsoft.co.uk/ArduinoShield.aspx)

//U8GLIB_SSD1351_128X128_HICOLOR u8g(76, 75, 8, 9, 7); // Arduino DUE, SW SPI Com: SCK = 76, MOSI = 75, CS = 8, A0 = 9, RESET = 7 (http://electronics.ilsoft.co.uk/ArduinoShield.aspx)

//U8GLIB_SSD1351_128X128_HICOLOR u8g(8, 9, 7); // Arduino, HW SPI Com: SCK = 76, MOSI = 75, CS = 8, A0 = 9, RESET = 7 (http://electronics.ilsoft.co.uk/ArduinoShield.aspx)

In the above code, which is an example of Arduino, after installing the relevant library, we first need to uncomment the line that is related to the specific LCD settings (line 66, U8GLIB_ST7920_128X64_4X u8g (10);). Then upload the code to Arduino.

spi lcd module lcd12864 made in china

Both those displays say they have an SPI interface, so that is how you connect them to the Arduino. But that is only the start, you then need to drive them with software. The thing to look at here is the IC that they mention. In the case of the 240 by 160 this is the ST7586. If you are lucky then someone might have written a libiary to drive them. Otherwise you will have to go through the data sheet and see if you can figure out how to do it.