Skip to content

Can a 1.54 inch 128x64 OLED display show Chinese characters?

By admin
Yes, a 1.54 inch 128x64 OLED display can absolutely show Chinese characters, but it’s not as straightforward as displaying English text. The key factor is the display’s resolution and the way Chinese characters are encoded and rendered. Let me break down the technical details, constraints, and real-world solutions you need to know. First, the display’s 128x64 pixel grid is a monochrome OLED with a 1.54 inch diagonal size, typically using the SSD1306 or SH1106 driver IC. This resolution is low compared to modern smartphone screens, but it’s sufficient for displaying Chinese characters if you handle the font size correctly. Chinese characters require more pixels than English letters due to their complexity. For example, a single Chinese character like “中” (zhong) needs at least 12x12 pixels to be legible, but 16x16 pixels is the standard for readability. With 128 pixels horizontally, you can fit about 8 characters per row at 16x16 size (128 ÷ 16 = 8), and with 64 pixels vertically, you get 4 rows (64 ÷ 16 = 4). So, a full screen can show 32 Chinese characters at 16x16 font size. That’s enough for short messages, labels, or simple UI elements, but not for long paragraphs. The real challenge is not the hardware but the software. The 1.54 inch 128x64 oled display communicates via SPI or I2C and sends raw pixel data to the driver. It doesn’t have built-in font support for any language, including English. You need to generate bitmap data for each Chinese character and store it in the microcontroller’s flash memory. Chinese characters are typically encoded in Unicode (e.g., UTF-8) or GB2312/GBK for simplified Chinese. To display them, you must convert the character code to a bitmap array. For example, a 16x16 Chinese character requires 32 bytes of data (16 pixels per row × 16 rows ÷ 8 bits per byte). If you have a 100-character set, you need 3,200 bytes of flash, which is manageable for most microcontrollers like Arduino Uno (32KB flash) or ESP32 (4MB flash). However, if you need full CJK (Chinese, Japanese, Korean) support with thousands of characters, the flash requirement skyrockets. For instance, the GB2312 standard includes 6,763 characters, requiring about 216KB of flash (6,763 × 32 bytes). That’s too much for an Arduino Uno but fine for an ESP32 or STM32 with external flash. Font size directly impacts readability. At 8x8 pixels, Chinese characters are illegible—they look like blobs. At 12x12, you can barely distinguish strokes, but it’s okay for simple, high-contrast characters. At 16x16, most characters are clear, though some complex ones like “龍” (dragon) may have overlapping strokes. At 24x24, you get excellent readability but only 5 characters per row and 2 rows (128 ÷ 24 ≈ 5, 64 ÷ 24 ≈ 2). Here’s a quick comparison table: | Font Size | Pixels per Character | Characters per Row | Rows per Screen | Total Characters | Readability | |-----------|----------------------|--------------------|-----------------|------------------|-------------| | 8x8 | 8 | 16 | 8 | 128 | Poor | | 12x12 | 12 | 10 | 5 | 50 | Fair | | 16x16 | 16 | 8 | 4 | 32 | Good | | 24x24 | 24 | 5 | 2 | 10 | Excellent | For practical use, 16x16 is the sweet spot for most applications like weather stations, menu systems, or data readouts. But if you’re displaying a single Chinese character as a logo or icon, you can go up to 64x64, which fills the entire screen. Another critical factor is the display driver. The SSD1306 is the most common, but it has a 1KB GDDRAM (graphic display data RAM). This RAM is organized as 128 columns × 64 rows, divided into 8 pages of 8 rows each. When you send pixel data, you must address each page and column. For Chinese characters, you need to pre-render the bitmap and send it in page mode. The SH1106 driver is similar but has a slightly larger RAM (132x64) and requires different initialization. Both work fine, but SSD1306 is more widely supported with libraries like Adafruit_SSD1306 or U8g2. Speaking of libraries, U8g2 is the best choice for Chinese character support. It includes a font rendering engine that can handle Unicode characters and even has built-in Chinese font sets like “wqy12” (WenQuanYi 12px) or “wqy16” (16px). These fonts are pre-compiled as bitmap arrays, so you don’t need to generate them manually. However, they consume significant flash: wqy12 uses about 8KB for basic ASCII and 200KB for Chinese characters. U8g2 also supports UTF-8 input, so you can directly write Chinese strings in your code. For example, with an ESP32 and U8g2, you can do: ``` #include U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); void setup() { u8g2.begin(); u8g2.enableUTF8Print(); } void loop() { u8g2.firstPage(); do { u8g2.setFont(u8g2_font_wqy16_t_chinese2); u8g2.setCursor(0, 16); u8g2.print("你好世界"); } while (u8g2.nextPage()); } ``` This works, but the flash usage is about 250KB for the Chinese font, so an Arduino Uno (32KB flash) can’t handle it. You’ll need a microcontroller with at least 256KB flash, like ESP32, STM32, or Teensy. If you’re stuck with an Uno, you can use a custom font with only the characters you need. For example, if you only need 10 characters, you can generate a 16x16 bitmap array for each and store them in PROGMEM. That’s only 320 bytes. Display speed is another consideration. The 1.54 inch 128x64 oled display has a refresh rate of about 60Hz, but updating the entire screen with Chinese characters takes longer due to the SPI bus speed. At 4MHz SPI clock, sending 128×64 pixels (1KB) takes about 2ms, but the font rendering and page flipping add overhead. With U8g2, updating a full screen of Chinese characters takes about 10-20ms, which is fine for static text. For animations, you might need to optimize by only updating changed regions. There’s also a common misconception about the display’s color. It’s monochrome, so Chinese characters are either white (on blue or yellow OLED) or black (on white OLED). Blue OLEDs have a slight blue tint, which can reduce contrast for small fonts. Yellow OLEDs are better for readability. The viewing angle is 160 degrees, so Chinese characters are readable from the side, but the pixel density is only 128x64 on a 1.54 inch diagonal, which is about 97 PPI (pixels per inch). That’s lower than a typical smartphone (300+ PPI), so characters at 16x16 appear about 4.2mm tall, which is comfortable for reading at arm’s length. Power consumption is low: the OLED draws about 20mA when all pixels are on, but Chinese characters with many white pixels (like in a white-on-blue display) can increase power. For battery-powered projects, you can use the display’s sleep mode (1µA) and only update when needed. If you’re using a pre-made module, check the pinout. Most 1.54 inch 128x64 oled display modules have 7 pins: VCC, GND, SCL, SDA, DC, CS, RES. Some have I2C (4 pins) or SPI (6-7 pins). The SPI version is faster for Chinese character rendering because it sends data in parallel. For I2C, the max speed is 400kHz, which is slower but uses fewer pins. One more thing: character encoding. If you’re sending Chinese text from a PC to the display via serial, ensure both ends use the same encoding. UTF-8 is standard, but some microcontrollers (like Arduino) use ASCII by default. You’ll need to convert the UTF-8 bytes to Unicode and then to the font bitmap. U8g2 handles this automatically, but if you’re using a custom library, you’ll need to implement a lookup table. In summary, the 1.54 inch 128x64 oled display can show Chinese characters, but you need to choose the right font size (16x16 is recommended), use a microcontroller with sufficient flash (ESP32 or STM32), and leverage libraries like U8g2 for efficient rendering. The display’s low resolution limits the number of characters per screen, but it’s perfectly adequate for simple Chinese text in embedded projects. If you need more characters, consider a larger display with higher resolution, like a 2.4 inch 240x320 TFT.

About the author

admin

A member of the Dinkyland storytelling crew — sharing what's happening behind every tiny door.

Ready for a tiny adventure?

Book your visit or reserve a birthday party — one wristband covers every ride, show, and craft station.