Share this

Design and application of vector graphics display in LCD human-machine interface

2026-04-06 07:22:30 · · #1
1 Hardware Design 1.1 Structure and Principle of the T6963C Module Currently, the main controllers used for graphic LCD modules are: T6963C (TOSHIBA), SED1335 (SEIKO EPSON), HD61830B (HITACHI), and MSM6255 (OKI). The graphic LCD module with an integrated T6963C consists of an LCD display screen, row and column drivers, control circuitry, and a PCB board. The module implements the interface between the T6963C and the row and column drivers and the display buffer RAM. It also includes hardware settings for the LCD screen structure (single-screen and dual-screen), data transmission method, display window length, and width. The T6963C can control LCD devices with a maximum dot matrix of 640×128 (single-screen) or 640×256 (dual-screen). The following description uses a single-screen structure as an example. The block diagram of the LCD module is shown in Figure 1. The T6963C can manage a maximum of 64KB of display buffer RAM. The display buffer can be divided into a text display area, a graphics display area (or text feature area), and a CGRAM area (an arbitrarily set area within the display buffer, used as an external character generator, typically 2KB). The specific size of the display buffer RAM is determined by the different display sizes of the module; for example, a 240×128 module has 16KB of RAM, and a 128×64 module has 8KB of RAM. The T6963C not only has basic text and graphics display functions but also text attribute display functions, a unique feature of the T6963C controller. However, text feature mode and graphics display mode cannot be used simultaneously (in the display buffer, when text feature mode is enabled, a separate area can be created outside the original graphics and text areas using a graphics area setting instruction as the text feature area to maintain the data in the original graphics area). 1.2 Correspondence between the Display Buffer and the LCD Screen The following uses a 240×128 dot matrix LCD screen as an example to establish the coordinate relationship between the graphics display buffer address and the corresponding LCD screen surface. The starting address of the text display buffer is 0000H, and the starting address of the graphics display buffer is 0800H. The lower left corner of the screen is taken as the origin (0, 0). Based on this, the range of the horizontal coordinate x is (0, 239), and the range of the vertical coordinate y is (0, 127). Under this coordinate system, the address of the graphics display buffer corresponds one-to-one with the coordinates of the LCD screen dot matrix. The following algorithm can be used to easily determine the physical address of any dot matrix coordinate (x, y) in the display buffer: (1) Determine the offset of the point relative to the starting address (0800H) of the graphics display buffer by bytes L. (2) Further determine the specific bit b within the byte where the point is located. b = x mod 8. After determining the address of the dot on the screen in the display buffer, the arbitrary point can be easily drawn on the screen using the bit operation instructions of T6963C. Combined with various specific drawing algorithms, different graphics can be drawn on the LCD screen. 1.3 Interface Circuit between T6963C Module and MPU The MPU can directly interface with the T6963C, and its interface circuit is shown in Figure 2 (direct access mode). The read/write control signals /RD and /WR of the T6963C LCD module are controlled by the read/write control signals /RD and /WR of the AT89C52, respectively. P27 connects to the chip select signal /CS, and P25 connects to the instruction and data channel selection signals C/D. The LCD module uses power-on reset, and VO is used to adjust the contrast of the LCD display. Based on this connection method, the physical addresses of the data channel and the instruction channel can be obtained as 5F00H and 7F00H, respectively . 2 Software Design 2.1 T6963C Instruction Transmission Method The module initialization is completed by hardware pin settings, so its instructions mainly focus on setting the display function. T6963C instructions can have one or two parameters, or no parameters. The execution of each instruction first sends the parameters (if there are parameters), and then sends the instruction code. To ensure normal command and data exchange between the MPU and T6963C, a status check must be performed before each instruction code transmission. 2.2 Human-Machine Interface Graphical Display The graphical human-machine interface display program includes subroutines for graphical menu display, dynamic login display, and selection of various function keys. Below is a reference program for quickly implementing graphical display using the classic lookup table method. 2.3 Design Concept In the process of power detection, to facilitate on-site wiring and connection analysis, it is necessary to display a vector diagram between three-phase voltage and three-phase current, referred to as a "hexagonal diagram" in power measurement. The module used in this system is a 240×128 dot matrix. A rectangular coordinate system is established with the center of the screen as the origin. The screen can then display vector graphics with a length of 0 to 64 dots and a phase angle of 0 to 360 degrees. Therefore, the magnitudes of the three-phase voltage and current input for display need to be compressed by a certain factor so that their amplitude variations are within the range of (0, 64). Since the LCD screen dot matrix corresponds to the module's display buffer (in rectangular coordinates), and the three-phase voltage and current to be displayed are vectors, coordinate transformation is required first. Furthermore, to meet the real-time requirements of measurement and display, a fast transformation speed is necessary. This system designs a method for transforming polar and rectangular coordinates using a lookup table. First, a mapping table is established between integer angles from 0 to 90 degrees and their sine values ​​and inserted into the program. This simplifies complex multiplication and division operations into simple lookup instructions, significantly improving transformation speed and saving memory. Using trigonometric induction formulas, calculating the sine and cosine of phase angles from 0 to 360 degrees can be easily equated to calculating the sine and cosine values ​​from 0 to 90 degrees. Then, the coordinate transformation for any phase angle can be solved using the lookup table method described above. Since phase angles greater than 255 degrees require two bytes to represent, this system, to simplify program writing and save register space, uses positive and negative phase angle flags to divide the phase angles from 0 to 360 degrees into two intervals: ±180 to 0. Through the coordinate transformation described above, the rectangular coordinates of the starting and ending points of the vector to be displayed can be obtained. Using the line drawing algorithm and the method mentioned earlier for drawing arbitrary points with known coordinates on the LCD screen, the vector relationship diagram of three-phase voltage and current can be displayed on the screen (Figure 3). 2.3.2 Design Concept Block Diagram and Coordinate Transformation Program Figure 4 is the design concept block diagram for displaying a set of vector signals in a hexagonal graphic display. The method of using a mapping table greatly improves the coordinate transformation speed, and the denser the mapping table, the higher the transformation accuracy. The following is a reference program for converting the polar coordinates of a vector with an amplitude of (0, 64) dot matrix length and a phase angle of (0, 90) degrees to rectangular coordinates. The starting point coordinates (XSTA, YSTA) of the vector are fixed points, so only the ending point coordinates (XEND, YEND) need to be obtained to call the line drawing subroutine to draw the vector line segment. 3 Conclusion In the "Comprehensive Power Detector", we use the image-to-data method to quickly generate a clear graphical menu interface and use the cursor to indicate the position to activate the menu button, thus forming a good graphical human-machine interface. This interface employs a lookup table method and an integer-digital differential analysis straight line drawing algorithm to achieve rapid coordinate transformation and hexagonal graphical display of power measurements. These methods are also applicable to LCD display modules with different dot matrix sizes and other controllers, such as the SED1335. This technology has been applied in actual products, and practical experience has proven its effectiveness.
Read next

CATDOLL 140CM Sana TPE

Height: 140cm Weight: 30kg Shoulder Width: 32cm Bust/Waist/Hip: 76/61/77cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22
CATDOLL 139CM Qiu Silicone Doll

CATDOLL 139CM Qiu Silicone Doll

Articles
2026-02-22
CATDOLL 108CM Cici

CATDOLL 108CM Cici

Articles
2026-02-22