Http://www.cnitblog.com/buf/archive/2008/10/16/50332.html
LCD modules with built-in T6963C controller are commonly used in mid-scale graphic LCD modules. This LCD module is composed of Liquid Crystal
Display controller T6963C and its peripheral circuit,
Row drive t6a40 group,
Column drive t6a39 group,
LCD Drive bias circuit, Display memory and LCD screen. The display module is only a 20-core dual-Row Flat cable interface.
For users who use the built-in T6963C LCD display module, they do not need to know the T6963C LCD display driver, dot matrix scan, Display memory management and other operations, all of which are automatically performed by T6963C.
Users need to understand the various data/instruction formats of T6963C, Display memory interval division, and interface pin function definition. For the microprocessor, the external interface of the display module is similar to that of a common I/O interface chip (such as 8255a,
Connect to the three main online processors by pin.
The microprocessor has 13 operations on T6963C in four categories:
One is the read STATUS Command (one entry), which has a one-byte status word in T6963C, the microprocessor must read the status word before each operation on T6963C and determine the corresponding bit to determine whether the operation can be performed on T6963C;
Second, set commands (9). These commands are used to set the display area, mode, and data address pointer, and set the cursor shape and data read/write mode;
The third is a bit Operation Command (1), which is used to operate pixels (points) on the LCD screen;
The fourth is the data read/write command (2). The data read/write command is the content displayed on the LCD screen.
The LCD module is equipped with a display memory (RAM), and the maximum value of T6963C is 64 K. After the memory is configured with instructions (Region and mode), each "bit" in the space set in the memory corresponds to a pixel (point) on the LCD screen, the binary value of "bit" indicates whether the pixels on the LCD screen are "displayed ".
T6963C sends the content of the Set area in the memory to the LCD continuously and scanned. The user sends the "data" to the set area in the memory through the interface of the display module.
2 T6963C controller allocation and management of Display memory
The main task of the LCD controller is to transmit the data written by the computer to the Display memory in some form as the display data to the LCD Driver System. The function strength of this function determines the performance of the controller.
The T6963C controller can transmit data to the LCD Driver System in two forms. The data transferred in two forms is stored in two different display areas, that is, the text display area and graphic display area or text attribute area.
Text display area: used for text display. In this way, the data in the text display cell is determined by the control department as a character code. One byte of data corresponds to the 8x8 dot matrix (pixel) character block on the display.
Graphic Display area: used for graphic display. In this mode, the data in the display area unit is determined by the control department as the display status of the corresponding point on the display screen. "1" indicates display, "0" indicates not display. One byte of data corresponds to L x 8 dot arrays (pixels) on the display screen.
Text attribute area: used for text display. The data in the unit is confirmed by the Control Department as the character display characteristics of the corresponding text display unit, such as positive display, negative display, and blinking display.
The graphic display area and text attribute area are located in the same display storage area. This display area can only be one type of display storage area, that is, text attributes are not available in the graphic display area, and vice versa.
The T6963C controller controls the partition management of the display memory by the content of several parameter registers in its control department.
A group is the 16-bit "start address" register sad of the display area, which determines the first address of the display area. This address corresponds to the display position in the upper left corner of the display area (home.
One is the "display byte/row" register C/R, which determines how many bytes of data the Controller will transmit to the driver system during a row scan. When the contents of these registers are determined, the addresses of each unit in the display area are determined in a one-to-one correspondence with the pixels displayed on the display screen, as shown in the following table.
Pixel coordinates |
0 ~ 7 Columns |
8 ~ 15 Columns |
16 ~ 23 Columns |
... |
(C/R-1) * 8 ~ (C/R-1) * 8 + 7 Columns |
0 rows |
Sad |
Sad + 1 |
Sad + 2 |
... |
Sad + C/R-1 |
1 line |
Sad + C/R |
Sad + C/R + 1 |
Sad + C/R + 2 |
... |
Sad + 2 * R-1 |
2 rows |
Sad + 2 * C/R |
Sad + 2 * C/R + 1 |
Sad + 2 * C/R + 2 |
... |
Sad + 3 * C/R-1 |
: |
: |
: |
: |
: |
: |
N rows |
Sad + (n-1) * C/R |
Sad + (n-1) * C/R + 1 |
Sad + (n-1) * C/R + 2 |
... |
Sad + N * C/R-1 |
(Note: If the display area corresponds to the text display area, the number of lines in the pixel coordinate must be multiplied by 8 .)
3 51 series single-chip microcomputer and built-in T6963C controller LCD module connection and use
The connection between 51 series single-chip microcomputer and the built-in T6963C controller LCD display module is very simple. There are two Methods: Through P0 and P2 interfaces, direct access is called; other I/O Ports (such as P1, P3, or extended I/O Ports) are called indirect access methods.
The single-chip microcomputer uses the T6963C controller to access the Display memory,
It is usually divided into two steps:
① Send address pointer,
② Read/write display data (C/D = "0"), or ① send address pointer, ② send Operation Command (C/D = "1 ").
The status of the T6963C controller must be determined before each data of the single-chip microcomputer and the T6963C controller.
In the T6963C controller, there is a model library with 128 standard characters (numbers, letters, symbols). The lattice is 8x5, the number of dots occupied by a standard character is determined based on the fs1 potential of the pin. fs1 = "0" is 8x8; fs1 = "1" is 8x6. The T6963C controller allocates a one-byte code for each standard character. For example, the code "a" is "21 H", which is essentially the address of the model in the model library.
When a single-chip microcomputer writes a standard character code to a character address in the text display area of the display memory, the T6963C controller uses the Code as the address of the font, extract an 8x8 (or 8x6) lattice pattern from the font and send it to the driving unit of the LCD display. When a single-byte data is written to an address in the graphic display area of the display memory, the T6963C controller only sends the data directly to the driver unit of the LCD display, it indicates the display status of 8 pixels corresponding to the memory unit on the LCD screen. When a single-chip microcomputer needs to operate on a certain pixel on the LCD screen, after determining the address, it only needs to send a bit operation command to the T6963C controller.
In the built-in T6963C controller LCD module, the T6963C controller continuously sends data from two attribute zones in the ram to the LCD display screen, the liquid crystal display "image" is the synthesis result of the data in these two attribute areas. The synthesis logic of the number of images is "different", "or" or, set by the setting command.