1. Project Design Background (Free related project link at the end)
In modern electronic products, liquid crystal displays (LCDs) are widely used in various devices. The LCD12864 is a commonly used 128×64 dot matrix liquid crystal display module, known for its clear display and low power consumption. With the advancement of technology, many applications require the display of Chinese characters and graphics, but due to storage limitations, traditional character library display solutions often fail to meet these needs. Therefore, the design of a non-character library LCD12864 based on a microcontroller has emerged, capable of flexibly displaying Chinese characters and graphics, and achieving scrolling animation effects.

2. Design Objectives
1. Achieve Chinese character display: Generate Chinese character dot matrix through algorithms to realize non-character library display.
2. Graphic design: Support the drawing and display of simple graphics.
3. Scrolling animation: Implement scrolling display effects for Chinese characters or graphics.
4. User-friendly: Simple interface, easy to operate.
3. Design Principles
1. Hardware part
Microcontroller: Common microcontrollers such as the 51 series, STM32, etc., are used to control the LCD module.
LCD12864 module: The core display part, responsible for displaying Chinese characters and graphics.
Input device: Buttons or knobs can be used as user input.
2. Software part
Dot matrix Chinese character generation: Convert Chinese characters into dot matrix format through algorithms, stored in the microcontroller’s memory.
Graphic drawing algorithm: Use simple drawing algorithms to generate and display graphics.
Scrolling animation implementation: Achieve smooth scrolling of characters or graphics through timer interrupts.
3. Display principle
The LCD12864 adopts a 128×64 dot matrix display, where each pixel can be controlled independently. By controlling the lighting or extinguishing of the corresponding dot matrix, the desired Chinese characters or graphics are generated. During display, based on user input or timer interrupts, the display content is updated to achieve dynamic effects.
4. Design Outlook
1. Function expansion: In the future, more graphic and Chinese character display options can be added to enhance user experience.
2. Performance improvement: Optimize code to increase display speed and smoothness.
3. Application scenarios: This design can be applied in fields such as billboards and electronic tags to meet various display needs.
5. Chinese Character Design and Graphic Introduction
1. Chinese character design
The dot matrix design of Chinese characters can follow these steps:
Select Chinese characters: Determine the Chinese characters to be displayed.
Dot matrix conversion: Use algorithms to convert Chinese characters into 8×16 or 16×16 dot matrix format.
Storage and calling: Store the dot matrix data in the microcontroller’s memory and call it through indexing.
2. Graphic design
Simple graphics such as rectangles and circles can be designed using the following algorithms:
Rectangle drawing: Control the corresponding dot matrix point by point based on the starting point and width/height.
Circle drawing: Use the midpoint algorithm or Bresenham’s algorithm to draw circles.
6. Implementation of Scrolling Chinese Character Animation
Through timer interrupts, periodically update the display content to achieve scrolling effects:
1. Initialization: Set the starting position and character content.
2. Timer interrupt: Update the display position at regular intervals to create a scrolling effect.
3. Update display: Update the LCD content based on the current position to create dynamic effects.
The non-character library LCD12864 design based on a microcontroller has broad application prospects. By flexibly displaying Chinese characters and graphics, it can meet various needs. In the future, more functional expansions can be carried out on this basis to enhance the practicality and fun of the design.
Free link:
Link: https://pan.baidu.com/s/1HWLIsX6sn2L_cTuIGuZTng
Extraction code: g4xr
