Design of LCD display based on ARM and WindowsCE

Publisher:创客1992Latest update time:2011-06-28 Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

With the continuous development of electronic information technology, the application of embedded systems is becoming more and more extensive. In embedded electronic measurement systems, LCD (Liquid Crystal Display) is the main device for human-computer interaction. It has low power consumption, small size and excellent character and graphic display functions. Windows CE is an embedded real-time operating system. Its friendly graphical interface has become the mainstream operating system for embedded development. It uses the Graphics Device Interface (GDI) to process the graphics output of the program. The numerous functions provided by GDI can be used to easily output graphics and text on the LCD screen [1].

The principle of designing LCD system based on embedded processor Intel PXA270 and Windows CE provides a solution for embedded portable devices to maintain low power consumption under high brightness display conditions. It is suitable for high-end PDAs, portable media players, handheld navigators, portable medical and test equipment, etc. The following article will introduce the main design principles of the LCD device for railway locomotive fault diagnosis on-board device newly developed by the 608th Institute of China Aviation Industry.

2 LCD hardware system based on IntelPXA270

The system uses the Intel PXA270 processor based on the ARM processing core, 64MB of SDRAM, M-System's DOC (Disk On Chip) H3 chip as the storage system, and an external 16-bit 800×480 TFT display.

2.1 ARM processor IntelPXA270 and its LCD control

Intel PXA270 is an embedded processor based on ARM microprocessor core launched by Intel. Its main frequency can reach up to 624MHz. Intel PXA270 has added Wireless MMX technology, which greatly improves multimedia processing capabilities. It also adds Intel SpeedStep dynamic power management technology, which minimizes device power consumption while ensuring CPU performance.

The built-in LCD controller of Intel PXA270 provides an interface between the Intel PXA270 processor and the flat-panel display. The flat-panel displays it supports include passive DSTN LCD screens, active TFT LCD screens, and LCD screens with internal frame buffers. The railway locomotive fault diagnosis on-board device LCD device newly developed by the 608th Institute of China Aviation Industry uses a TFT LCD screen.

The LCD controller is used to transmit display data and generate necessary control signals. Table 1[2] shows the control signals of the LCD controller built into Intel PXA270:

Table 1 LCD controller control signals

The built-in LCD controller of Intel PXA270 supports multiple display modes, including pixel data format, display screen size, scanning mode, color mode, etc. The Intel PXA270 LCD controller has many registers for configuring different LCD screens and different display modes. The LCD controller has a dedicated DMA, which can automatically transfer display data from the frame memory to the LCD driver. Through the dedicated DMA, data can be displayed without CPU intervention.

2.2 TFT LCD Screen

The TFT LCD is a FG070053DSSWJGT1 display screen with a display screen size of 7 inches and a resolution of 800×480. It integrates an input control unit, a TFT display module, a scan driver IC, a backlight, a DC/DC voltage converter, a data driver IC, etc. Figure 1 shows the internal structure of the G070053DSSWJGT1 display screen [3].

Figure 1 TFT internal functions and interfaces

The timing required by the TFT LCD display consists of frame synchronization (VSYNC), line synchronization (HSYSNC), bit clock (DCLK) and data (Data[0:15]). Frame synchronization and line synchronization indicate the beginning of each frame and each line, as shown in Figure 2.

Figure 2 TFT LCD timing diagram

2.3 TFT screen display interface circuit [page]

Combined with the internal structure and timing diagram analysis of the LCD controller built into IntelPXA270 and the FG070053DSSWJGT1 LCD screen, the LCD display interface circuit is designed, mainly to connect the control signal of IntelPXA270 with the control pin of the LCD screen, as shown in Figure 3. The data sending pin of the LCD controller is connected to the data receiving pin of the FG070053DSSWJGT1 through the 16-bit data line, that is, (R0-R4, G0-G5, B0-B4) is connected to L_DD0-L_DD15; the frame clock, line clock, pixel clock, etc. are connected to the LCD screen; ADJ uses a PWM pulse with a voltage of 0-3.0V and a frequency of 20KHZ to adjust the brightness of the LCD screen backlight, which can effectively control power consumption while meeting user requirements. In Figure 3, the network label LCLK is the line clock control signal, FCLK is the frame clock control signal, PCLK is the pixel clock control signal, and OE is the data output enable signal. VDD is provided by a DC 5V regulated power supply. U/D is pulled down by a resistor to provide an up and down flip signal for the screen. L/R supports left and right flip control of the screen.

Figure 3 TFT LCD interface circuit

3 LCD display program design

LCD driver development under Windows CE is implemented using the Basic Graphics Engine (GPE) class [1] [5]. Before using the GPE class to write a driver, first analyze the requirements for the display device when using the GPE class to write a display driver. The memory layout requires the display device to use a linear frame buffer, and all display memory is continuous; then analyze the GPE class's requirements for the data format in the memory. The LCD screen is a top-down format, with pixel (0, 0) in the upper left corner and pixel (width-1, height-1) in the lower right corner. The stride of the frame buffer, which means the number of bytes in memory occupied by a scan line on the display device, should be an integer multiple of four bytes. Even if some useless bytes are filled at the end of each scan line, the CPU can access the entire frame buffer without making a "row" selection. The frame buffer should not use bit planes (bit planes are each color channel stored separately in the frame buffer).

The LCD controller built in Intel PXA270 is used, which integrates 7 channels of DMA and supports RGB modes with pixel depths of 2, 4, 8, 16, 18, and 24 bits, and is designed in 16-bit RGB mode. The image data is stored in the memory, and the frame data is accessed using DMA. The frame size and frame address are specified, which can meet the requirements of the linear frame buffer of the GPE class. The LCD control and LCD screen meet the hardware requirements of using the GPE class to implement the display driver under Windows CE.

3.1 Creating a GPE-based display driver

Using the GPE class simplifies the development of Windows CE display devices. The GPE class represents a display device and is a pure virtual class. This basic GPE class must be inherited when designing a display driver.

First, define a new class (class SA2Video) to inherit the GPE class. According to the requirements of the GPE class, implement the following functions:

NumModes ------Returns the display modes supported by the display driver.
GetModeInfo ------Returns information about the specified display mode, such as display pixel width and depth. It processes the display mode returned by the NumModes() function. When the SetModes() function is called, it always returns the first mode value in the mode configuration list.
SetModes ------Sets the display mode.
AllocSurface------Allocates a page. A page is just RAM or video RAM that stores pixel data. It is a block of memory. The GPESurf class can be used to represent a page on the system video memory. Ensure that a page is allocated on the video RAM.
SetPointerShape------Sets the cursor bitmap and cursor area.
MovePointer------Moves the cursor.
BltPrepare ------Called before a bit block transfer operation. If the driver supports operations before bit block transfer, it allows the driver to establish a hardware bit block transfer (blit) operation and returns an actual operation function to perform the bit block transfer (blit). The default Blit operation function is provided in the GPE class.
BltComplete------Executed after the block transfer is completed. If necessary, it allows the device to do any cleanup operations.
Line ------Called before and after line drawing. If called before drawing, this function can establish the hardware line drawing operation and then return to the GPE default line drawing operation. If called after drawing, this function can do any cleanup after line drawing operation.
InVBlank ------Flags whether the display is updated during the horizontal synchronization cycle.
These functions are empty functions in the source code of the GPE class, so the function overloading must be implemented in (class SA2Video).

3.2 Creating an LCD Controller Interface Driver

Creating an interface driver for the LCD controller is mainly about completing the hardware configuration, including the configuration of the LCD controller and the IO pin interface. First, configure the IO registers in the Intel PXA270 according to the circuit connection of the LCD display interface, and then configure the LCD controller according to the parameters provided by the external LCD screen, mainly configuring the TFT interface timing, such as frame clock, line clock, pixel clock, data output enable, etc. [6]. The XllpLCDInit() function in the xllp_lcd.c file implements the hardware initialization. The following is the key code of this function:

XLLP_STATUS_T XllpLCDInit(P_XLLP_LCD_T pXllpLCD)
{ XLLP_STATUS_T status = 0;
// Initialize IO interface and configure according to LCD connection circuit diagram
LCDSetupGPIOs(pXllpLCD);
// Initialize LCD controller and frame buffer
LCDInitController(pXllpLCD);
// Clear the status register of LCD controller
LCDClearStatusReg(pXllpLCD);
// Enable LCD controller and drive LCD screen to display data
LCDEnableController(pXllpLCD);
return status;
}

3.3 LCD controller display mode settings

WindowsCE GDI supports display devices with multiple color grayscale and color modes, from colors represented by only one bit to true 32-bit RGB modulated by a palette. Each format supports several different pixel arrangements, depending on whether access to the display memory supports single-byte, double-byte, or four-byte modes.

Use the following mask to extract the red, green, and blue values: The format in which each pixel is represented by 16 bits is a mask format and is not color-adjusted. We use two bytes to store each pixel. Combining the hardware circuit diagram of the TFT LCD display interface and the LCD controller built into the Intel PXA270, according to the instructions in the Intel PXA270 processor manual, the control pins need to be initialized [7]. In Figure 3, port 14 is used for frame clock control. Combining the Intel PXA270 data manual, we configure port 14 as the L_VSYNC function, which is implemented using the following statement:
GAFR0_L|=((GAFR0_L&~(1u<<29))|(1u<<28))
All display data lines L_DD0—L_DD15 are set as output ports and set as display data outputs. The program design is as follows:

[page]

p_GPIORegs-> GPDR1|=(XLLP_GPIO_BIT_L_DD0|XLLP_GPIO_BIT_L_DD1 |XLLP_GPIO_BIT_L_DD2
|XLLP_GPIO_BIT_L_DD3 | GPIO_BIT_L_DD6| XLLP_GPIO_BIT_L_DD7 |XLLP_GPIO_BIT_L_DD8|XLLP_GPIO_BIT_L_DD9 | |XLLP_GPIO_BIT_L_DD14|XLLP_GPIO_BIT_L_DD15); p_GPIORegs->GAFR1_U=(p_GPIORegs->GAFR1_U uses virtual addresses under WindowsCE. A mapping function converts the physical address used into a virtual address. This is required by the WindowsCE operating system. The mapping address The function is BOOL MapVirtualAddress().





Configure the LCD control register according to the display mode of the screen, including the mode of configuring the LCD control signal. By referring to the data sheet of Intel PXA270 and a series of calculations, the parameters are configured based on the TFT LCD timing diagram:

L_FCLK is the frame clock; L_LCLK_A0 is the line clock; L_BIAS is the clock enable; L_PCLK_WR is the pixel clock, LDD<17:0> is the pixel data, in this design we only use LDD<15:0>.
ENB: LCD data enable bit HSP: horizontal clock signal voltage polarity
0------LCD is not available 0------Horizontal clock is high level valid
1------LCD enable 1------Horizontal clock is low level valid
PCP: Pixel clock voltage polarity
0------Pixel data is sampled when the data pin is rising edge
1------Pixel data is sampled when the data pin is falling edge

(1) Definition of rows and columns:
PPL: The number of horizontal pixels on the LCD screen. The value is determined by the length of the LCD screen.
PPL = row width - 1.
In this design, the row width is 800, so PPL = 800-1;
LPP: The number of vertical pixels on the LCD screen. The value is determined by the width of the LCD screen.
LPP = column height - 1.
In this design, the column height is 480, so LPP = 480-1;
(2) L_PCLK_WR:
VCLK is the clock signal of the LCD controller. This signal is the pixel clock signal between the LCD controller and the LCD driver. When calculating VCLK, you need to first understand the frame rate range required by the LCD screen, and then set a value within the frame rate range as CLKVAL. The relationship between VCLK and CLKVAL can be calculated using the following formula: VCLK (Hz) = HCLK / ((CLKVAL + 1) x 2)
The minimum CLKVAL is 0, and the maximum CLKVAL is determined by the frame rate [8].
(3) Values ​​of various delays:
BFW: The delay length required at the beginning of a frame
EFW: The delay length required at the end of a frame
VSW: Definition of the width of the frame synchronization signal VSYNC
BLW: The delay length required at the beginning of a line
ELW: The delay length required at the end of a line
HSW: Definition of the width of the line synchronization signal HSYNC

4 Conclusion

LCD display design is based on embedded processor Intel PXA270 and Windows CE. LCD drives TFT display screen. Display mode is active single scan color mode. Pixel depth is 16-bit RGB format. Screen size is 800×480. By making full use of Intel PXA270 hardware resources, Intel PXA270 is used to control color display screen. Display brightness reaches 100 nits. Under high brightness of LCD, the power consumption of display is less than 365 mW, which overcomes the contradiction of high brightness accompanied by high power consumption of general TFT LCD. It supports the graphical display of Windows CE interface on user-customized TFT LCD screen. Since the designed hardware driver circuit only needs LCD controller to give frame synchronization signal, line synchronization signal, pixel clock, data enable signal and RGB data signal, the designed driver circuit can be flexibly transplanted to different platforms.

Keywords:ARM Reference address:Design of LCD display based on ARM and WindowsCE

Previous article:Multi-parameter measurement system of solar cell modules based on ARM
Next article:Design of Sonar Waveform Generation System Based on ARM and FPGA

Recommended ReadingLatest update time:2024-11-16 21:27

2 working states and 7 working modes of ARM processor
Two working states 1. ARM state: 32 bits. The ARM state executes word-aligned 32-bit ARM instructions. 2. Thumb state, 16 bits, execute half-word aligned 16-bit instructions. 3. Use the Bx Rn instruction to switch between the two states: Where Bx is a jump instruction, and Rn is a register (1 word, 32 bits). If
[Microcontroller]
2 working states and 7 working modes of ARM processor
Software and hardware selection for embedded ARM Linux development
In today's highly developed science and technology, I believe that many students in school stay in the various application development of 51 single-chip microcomputers, make a gadget, and get a good ranking. This has invisibly increased the understanding and knowledge of single-chip microcomputers and laid a solid foun
[Microcontroller]
Software and hardware selection for embedded ARM Linux development
Handheld device SoC based on ARM core
Introduction With the advancement of semiconductor technology and the emergence of chip design methods - IP reuse technology, SoC has become more and more common in consumer electronic products. Last year, our research group launched a SoC project called Garfield. Garfield is defined as an embedded processor for lo
[Microcontroller]
Design and implementation of ARM/DSP DC motor monitoring interface based on QT/E
0 Introduction Embedded technology is widely used in the field of robot control. It concentrates the latest scientific research results in multiple disciplines such as mechanical engineering, automation control, and artificial intelligence. It has become the focus and center of current scientific and technological res
[Microcontroller]
Design and implementation of ARM/DSP DC motor monitoring interface based on QT/E
ARM History 10 - Graduation Project (Watches)
#include "S3C2440addr.h" #include "math.h" #define pi 3.141593 U16 SEC, MIN, HOUR, TmpSEC_10, TmpMIN_10, TmpHOUR_10,TmpSEC_1,TmpMIN_1,TmpHOUR_1; U16 SEC_x, SEC_y, MIN_x, MIN_y, HOUR_x, HOUR_y, OldMIN=10000; U16 PandColor_big ; U16 PandColor_sml ; extern U16 Flag; external U16 fz; extern const unsigned char gImage_go
[Microcontroller]
Processor architecture (nine) arm soc documentation
In this document we can learn the following At the architectural level, ARM core gic amba are all architecture series, and then they implement each RF document respectively https://developer.arm.com/architectures/cpu-architecture/a-profile/docs https://developer.arm.com/architectures/system-architectures/amba
[Microcontroller]
Processor architecture (nine) arm soc documentation
Parallel Active Power Filter Controller Based on DSP ARM
introduction In recent years, with the widespread application of power electronic equipment and nonlinear and impact equipment, the harmonics generated in the power grid have caused serious pollution to the power grid system. Therefore, eliminating harmonic pollution in the power grid has become an important topic i
[Microcontroller]
Exclusive access instructions LDREX and STREX on ARM platform
In order to achieve synchronization between threads, a mutex lock is usually added before executing the critical code segment, and unlocked after the critical code segment is executed. In order to realize the so-called concept of mutex lock, the platform generally needs to provide support. This article mainly e
[Microcontroller]
Exclusive access instructions LDREX and STREX on ARM platform
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号