Application of LCD based on T6963CFG in embedded system

Publisher:JoyousJourneyLatest update time:2012-10-22 Source: 21ic Keywords:T6963CFG  LCD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

In the development and application of embedded systems, choosing low-priced, high-performance LCD devices has always been the goal pursued by designers. Small and medium-sized LCDs are favored by developers for their multiple specifications, low prices, and the characteristics of being very suitable for "tailor-made" embedded systems. T6963CFG is an LCD controller produced by TOSHIBA, which can be used for LCDs of different specifications. The HS240128 display produced by Shenzhen Hansheng Company uses this LCD controller, with a resolution of 240×128, self-scanning circuit, and text display, graphic display, and mixed text and graphic display functions.

2 T6963CFG control commands and timing

The T6963CFG is an LCD controller that works with large-scale LCD drivers and data storage. The controller has 8 parallel data, read/write control, mode selection, brightness and backlight control interface lines, which can be easily connected directly to various types of processors or microcontrollers. The T6963CFG has a built-in font of 128 characters; the external expansion memory is up to 64 KB (HS240128 display expands 32 KB) for display buffers, such as text areas, graphics areas, and custom character areas; the LCD display window can be easily moved within the display buffer.

2.1 Control commands and status words

The T6963CFG command word has three basic formats:

Format 1: Data 1 Data 2 Command code
Format 2: Data 1 Command code
Format 3: Command code

When using format 1, you need to write data 1, data 2, and command code in order, one byte at a time. If you choose format 3, you only need to write command codes. Before reading or writing data to the LCD, you must perform a status check. Only when the LCD allows can you perform the corresponding operation. Its status word and its function are shown in Table 1.



2.2 Interface Signals and Timing

After the HS240128-1 display is packaged, 21 interface signal lines remain:

C/D: command/data (high/low) selection signal;
CE: chip select (low) signal;
WR: write (low) signal;
RD: read (low) signal;
D0~D7: data signal;
FS: font selection signal (high: 6×8, low: 8×8);
FG: casing safety ground;
VSS: GND (ground);
VDD: power supply for logic circuit and LCD (5 V);
VD: drive voltage adjustment input (brightness);
VEE: LCD drive power supply (output, -15 V);
RST: reset (low) signal;
K: backlight (ground);
A: backlight (5 V).

The read and write timing of the LCD interface control signal is shown in Figure 1. The timing of each control signal can be simulated by the general input and output (GPIO) interface of the microcontroller. For example, when C/D is high, CE is low, WR is high, and RD is low, the status word of T6963CFG can be read from the data line (D0~D7).

3 Hardware interface circuits in embedded systems

Usually LCD products have corresponding hardware interface circuits, but their types are not the same. LCDs with self-scanning circuits that can provide text, graphics, and mixed text and graphics display functions can be easily connected to embedded microcontrollers or single-chip microcomputers available on the market, such as LPC2104, 2119, etc. S3C44B0X is a cost-effective embedded system-on-chip solution provided by Samsung. It uses the ARM7TDMI core and integrates a wealth of peripheral components on the chip, which is particularly suitable for applications that are sensitive to cost and power consumption. Although S3C44BOX integrates LCD control logic, the control interface of the HS240128 display has a built-in control circuit. Using the rich GPIO port resources (71) of S3C44BOX, it is easy to achieve matching. In this system design, PD0~PD7, PE0~PE2, PG4~PG5 are selected as the control lines and data lines of the LCD. Its circuit connection is shown in Figure 2. [page]

According to the read and write timing of T6963CFG and the corresponding circuit matching, the functions of the read and write operations are:

char read(char type) ∥Read data from T6963CFG

4 Display Control and Programming

4.1 Display Buffer Settings

The display buffer can be divided into the system memory display buffer and the LCD display buffer. Of course, the system can also only set the LCD display buffer, and the program can only operate on the LCD display buffer. Usually the LCD display buffer is set in the I/O interface circuit, such as the display buffer size of HS240128 is 32 KB. According to the needs, the LCD display buffer can define one, two or three different display areas, such as: text area, graphic area and custom character font area. The size of each area can be customized. As shown in Figure 3. The LCD controller can automatically output and refresh the display information of the text area and graphic area in the LCD display buffer to the screen. The display position of the screen has a mapping correspondence with the position of the display buffer.

Setting up a display buffer in the system memory is usually to standardize program design and improve work efficiency. The program first reads/writes the display buffer in the system memory, and then updates its data to the LCD display buffer. The system memory display buffer is divided into a text area and a graphic area. This design sets an 8 KB text area and a 16 KB graphic area. In character mode, the text area can map 17 display pages, and in graphic mode, the graphic area can map 4 display pages.

4.2 Character and Graphic Display Process

4.2.1 Character display process

In character mode, HS240128-1 is equipped with 128 commonly used character fonts. By writing the corresponding character code 00H~7FH in the specified text display buffer, the LCD output characters can be realized [1]. The LCD display also provides an extended character function with character codes of 80H~FFH. Its font code (8×8 dot font) needs to be written in advance into the custom character font buffer. Its address is 7800H~7FFFH. In the application, the font size (1: 6×8 or 0: 8×8) is selected by controlling the FS pin. In 6×8 mode, the screen can display 40 characters in one line, and in 8×8 mode, 30 characters in one line. The entire screen can display 16 lines of characters. [page]

The system memory text buffer has a mapping relationship with the LCD text display buffer. Its data format is set according to the screen format size. For example: a line of 30 characters corresponds to 30 consecutive bytes of memory. A screen (page) of 16 lines corresponds to 480 consecutive bytes of memory. If the memory text buffer is 8 KB, 17 pages (272 lines in total) can be mapped, and its buffer is set to: Text_Buffer[272][30] (row and column two-dimensional array). The process of transferring data from the memory text buffer to the LCD text buffer can be implemented by the following code:

The LCD controller automatically scans and displays the first page of the 17 pages of data sent from the memory. If you want to display the second page or other pages, just reset the text area start address to the LCD controller. Therefore, the LCD can start displaying from any position in the display buffer. For example, to start displaying from the second line, the LCD text area start address should be 30 (0x001E).

The process of setting the start address of the text area is as follows:

4.2.2 Graphics display process

In graphics mode, the display method is to write points to draw. Each time data is written to the graphics buffer, the unit is one byte (8 points). The HS240128 has a resolution of 240x128, and a full screen (page) has a total of 3840 bytes. The controller T6963CFG of HS240128-1 automatically scans and displays the information in the graphics buffer. The system memory graphics display buffer has a mapping relationship with the LCD graphics display buffer, and its data format is set according to the screen format size.

For example: a row of 240 dots corresponds to 30 consecutive bytes of memory. A screen (page) has 128 rows, corresponding to 3,840 consecutive bytes of memory. Set the memory graphics buffer to 16 kB and map 4 pages of the LCD screen (512 rows in total). The memory graphics buffer is set to: Graphic_buffer[512][30] (row and column array), then the process of transferring data from the memory graphics buffer to the LCD graphics buffer can be implemented by the following code:



In addition, the screen scrolling function is realized by setting the starting address of the graphics area. Each time a line is scrolled, the starting address of the graphics area is modified by +30. For example, if the graphics starts to be displayed from the second line, the address of the graphics area sent to the T6963CFG controller should be 0x201E, that is, the first address of the graphics area is 2000H+30=0x201E.

The process is as follows:



4.2.3 Chinese Character Display Process

The display process of Chinese characters is carried out in graphic mode. There is no Chinese character library in HS240128-1. When displaying Chinese characters, users need to customize the font and write it into the LCD graphic display buffer. The display position can be mapped according to the display page. The Chinese character font is in 16×16 dot matrix format (32 bytes). Users who need a 16x16 Chinese character font can obtain it from general Chinese character font extraction software, which will not be described in this article.

4.3 Programming Process

When programming HS240128, first prepare the data in the memory display buffer and write the data into the LCD buffer. The LCD automatically realizes the scanning display function. To realize the screen scrolling function, simply modify the starting address of the LCD text area and graphic area. The basic process is shown in Figure 4.



5 Conclusion

This article systematically introduces the working principle of the T6963CFG controller and the LCD software and hardware application interface, and discusses in detail the application methods of dot matrix LCDs and design examples in embedded systems, hoping to provide a reference for embedded system developers when selecting and using LCDs. The methods described in this article have been well applied in some embedded system designs.

参考文献:
[1]. T6963CFG datasheet http://www.dzsc.com/datasheet/T6963CFG_1714170.html.
[2]. LPC2104 datasheet http://www.dzsc.com/datasheet/LPC2104_454512.html.
[3]. S3C44B0X datasheet http://www.dzsc.com/datasheet/S3C44B0X_589522.html.
[4]. ARM7TDMI datasheet http://www.dzsc.com/datasheet/ARM7TDMI_139812.html.
[5]. PE0 datasheet http://www.dzsc.com/datasheet/PE0_1248869.html.
[6]. PE2 datasheet http://www.dzsc.com/datasheet/PE2_1200684.html.

Keywords:T6963CFG  LCD Reference address:Application of LCD based on T6963CFG in embedded system

Previous article:Driver design of I2C bus device in embedded Linux system
Next article:Implementing personalized calligraphy input on PDA through ADS7846

Recommended ReadingLatest update time:2024-11-16 20:34

51 MCU: Use timer and LCD1602 to make a simple clock
#include "regx52.h" #include "LCD1602.h" void Delay(int time) {     while(time--) //while loop takes 10us     {     } }  void Timer0Init(void) //1 millisecond @ 11.0592MHz {     TMOD &= 0xF0; //Set timer mode     TMOD |= 0x01; //Set timer mode     TL0 = 0x66; //Set the initial timing value     TH0 = 0xFC; //Set
[Microcontroller]
51 MCU: Use timer and LCD1602 to make a simple clock
Design of energy harvesting charger based on EasyARM1138
With the development of computer technology and power electronics technology, mobile phones, digital products, laptops, portable instruments and other devices are becoming indispensable tools in people's lives. The design of the chargers corresponding to these products is also receiving more and more attention, and
[Power Management]
LCD1602 LCD display module single chip microcomputer driver in-depth explanation of the hardware
(This article is based on the LCD1602 of the HD44780 main control chip. The screenshots are also from the HD44780 data sheet. Users can search for its datasheet by themselves. Some of it is sorted out online, but it is definitely much more in-depth than what you see) 1. Interface  LCD1602 is a character LCD display
[Microcontroller]
LCD1602 LCD display module single chip microcomputer driver in-depth explanation of the hardware
Universal 51 MCU LCD1602 driver
File: lcd_1602.h #ifndef _LCD1602_TRAVELER_H_ #define _LCD1602_TRAVELER_H_ /*****************************Items to be configured*******************************/ #define DATA_LCD P0 //LCD and MCU data port sbit RS_LCD = P2^5; // Connection of RS, RW, E terminals of LCD on MCU side sbit RW_LCD = P2^6; sbit
[Microcontroller]
How to use Mitsubishi plcd8030
Mitsubishi PLC D8030 is a high-performance programmable logic controller widely used in industrial automation. This article will introduce the use of Mitsubishi PLC D8030 in detail, including hardware composition, software installation, programming, debugging, fault diagnosis and other aspects. 1. Hardwar
[Embedded]
Design of high-power digital electroplating power supply parallel current sharing system based on STM32
The STM32 series processor is an MCU based on the ARM Cortex-M3 core produced by STMicroelectronics. It is specially designed for embedded applications such as microcontroller systems, automotive control systems, industrial control systems and wireless networks. It has the advantages of high performance, low power cons
[Microcontroller]
Design of high-power digital electroplating power supply parallel current sharing system based on STM32
pic MCU DS18B20 sampling LCD1602 display
#include "1602.h"  #include "18b20.h"  #include "main.h"  __CONFIG(0X0B31);  main()  {      char msg  = {"  Temperature:  ","              .C"};     delay_us2 (40, 40);      delay_us2 (100, 200);      initial();      while(1) {          start_convert();          change_to_ascii (get_temp (), &msg );              displ
[Microcontroller]
Design of large LCD backlighting system
Abstract: LCDs (liquid crystal displays) are electrically controlled light-emitting tubes. LCD TVs (liquid crystal display televisions) use white light as the "backlight", and usually use cold cathode fluorescent lamps (CCFL) to illuminate the color fluorescent screen. Other technologies, such as light-emitting diod
[Industrial Control]
Design of large LCD backlighting system
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号