Краткое содержание страницы № 1
H8S/H8SX Series
Direct Drive LCD Design Guide Version 2.6
User’s Manual
Direct Drive Solution
Renesas Technology America
Rev. 2.60
america.renesas.com
September, 2009
Краткое содержание страницы № 2
Direct Drive LCD Design Guide Index 1. INTRODUCTION................................................................................................................................................ 3 1.1 DIRECT DRIVE LCD OVERVIEW...................................................................................................................... 3 1.1.1 Philosophy ...................................................................................................................................
Краткое содержание страницы № 3
Direct Drive LCD Design Guide 4. LCD API DEFINITION..................................................................................................................................... 15 4.1.1 Standard Redefines ....................................................................................................................15 4.1.2 LCD API Data Types .................................................................................................................15 4.1.3 LCDInit..........
Краткое содержание страницы № 4
Direct Drive LCD Design Guide 1. Introduction This document provides technical information of how to configure the LCD panel parameters required by Renesas LCD Direct Driver according to the LCD panel datasheet published by the manufacturers. This document will also describe all the APIs (Application Programming Interface) in the LCD Direct Driver and their usages. An overview of the system hardware is also provided 1.1 Direct Drive LCD Overview The H8S and H8SX device families includ
Краткое содержание страницы № 5
Direct Drive LCD Design Guide 2. Driver Configuration The LCD Direct Driver is configured through the setting of macro definitions. These macros are illustrated in the sample code. The following table briefly describes the location of each of these macros and their location in LCD Direct Drive demonstration code. For examples of each macro usage, refer to the demonstration code. 2.1 LCD Direct Drive Configuration Macros Macro Name Description Units Demo Location System Clock Configura
Краткое содержание страницы № 6
Direct Drive LCD Design Guide Macro Name Description Units Demo Location FRAME_CS Platform Configuration CS # DirectLCD_CNF(platform).h FRAME_BUS_CYCLES Platform Configuration Bclk DirectLCD_CNF(platform).h CAS_LATENCY Platform Configuration Bclk DirectLCD_CNF(platform).h SDRAM_PAGE_SIZE Platform Configuration Words DirectLCD_CNF(platform).h VSYNC_PORT Platform Configuration Port # DirectLCD_CNF(platform).h VSYNC_PIN Platform Configuration Pin # DirectLCD_CNF(platform).h HSYNC_PORT Platform
Краткое содержание страницы № 7
Direct Drive LCD Design Guide 2.2 Frame Buffer Configuration The frame buffer is the external memory area that is used to store the 16bpp image data that will be presented on the LCD screen. The quantity of frame buffers is typically 2 or more. This allows the MCU to be updating one frame wile the ExDMA is transferring the other frame to the LCD panel, this behavior allows for fast transitions and the user does not see operations occurring in the non-displayed buffers. Typically, the fra
Краткое содержание страницы № 8
Direct Drive LCD Design Guide Figure 1. RAM Frame Raster Data Figure 2. PANEL_ROTATE Mode Figure 3. Images from Various Display Settings 7
Краткое содержание страницы № 9
Direct Drive LCD Design Guide 2.3 Driver Mode Selection There are several different modes of operation currently supported in the Direct Drive LCD driver. The selection of operation mode depends on RAM type selection and LCD panel resolution. 2.3.1 SRAM_DD Defining this macro selects a mode of operation that utilizes SRAM (or PSRAM) as the frame buffer. In this operation mode, the ExDMA ACK signal supplies the Dot Clock during data transfer and the TPU supplies the dot clock during blanki
Краткое содержание страницы № 10
Direct Drive LCD Design Guide Figure 5 H8SX SDRAM in Cluster Mode Note 1: To create the highest LCD Dot Clock frequency on the H8SX requires using cluster mode. In this mode, EDACK is not generated and an equivalent signal must be generated. The above circuit creates the necessary timing. 2.4 Driver Mode Configuration The driver characteristics are configured with the following macros. 2.4.1 DOT_CLOCK_FREQUENCY_DATA This macro configures the dot clock frequency during the data tran
Краткое содержание страницы № 11
Direct Drive LCD Design Guide Figure 6 LCD Panel Macro Definitions 2.6 LCD Platform Configuration The LCD Direct Driver is configured to operate with a given hardware platform by setting macro definitions. These values will have to be determined from the schematics on the hardware platform. As an example, the demonstration code can be compared the LCD direct drive hardware schematics. 2.6.1 FRAME_CS This is the numeric value of the CS pin used for the frame buffer, for example if CS2 i
Краткое содержание страницы № 12
Direct Drive LCD Design Guide 2.6.10 Xxxx_TPU_CHANNEL Enter the channel number for the requested TPU signal. For example if the H8SX DOTCLK is mapped to TPU TIOCB0, enter “0”. 2.6.11 Xxxx_TPU_PIN Enter the pin letter for the requested TPU signal. For example if the H8SX DOTCLK is mapped to TPU TIOCB0, enter “B”. 11
Краткое содержание страницы № 13
Direct Drive LCD Design Guide 3. Typical LCD Panel Connections This section illustrates typical connections on an LCD panel and how they are interfaced to the MCU in a Direct Drive configuration. 3.1 LCD panel interface Figure 7 Example Connections for a Kyocera TFT-LCD Panel 3.1.1 Power Supplies Many panels require multiple supplies. Check your panel’s specification to see how many ground and different voltage level connections it requires. In the example case of a Kyocera 320x
Краткое содержание страницы № 14
Direct Drive LCD Design Guide entire panel to fill with valid pixels is the maximum refresh rate. Displays in existing media systems usually have refresh rates between 48Hz and 120Hz to avoid visible flicker. HSync, VSync and Dot Clock are all generated using TPU channels of the H8S or H8SX microcontrollers. The TPU allows timer compare actions which synchronize these signals to the ExDMA request line. This ensures that the clocks are generated when valid data is available on the bus. 3.
Краткое содержание страницы № 15
Direct Drive LCD Design Guide 3.2 Hardware Design Below is a block diagram of a LCD system which uses Flash and SRAM for respectively storing and buffering the images to be displayed. The following table describes the TPU channels and pins used for direct drive. Note that the TPU synchronization capability is used to create a common time base between the HDEN, HSYNC and VSYNC pins. Suggested Signal TPU Channel Requirements Channel DOTCLK Output using PWM 1 Mode 1, 2, 4 or 5 DOTPER TGR
Краткое содержание страницы № 16
Direct Drive LCD Design Guide 4. LCD API Definition 4.1.1 Standard Redefines These following type have been redefined in order to make the code easier for formatting. typedef unsigned char uI08; // Unsigned Integer 8-bits typedef signed char sI08; // Signed Integer 8-bits typedef unsigned short uI16; // Unsigned Integer 16-bits typedef signed short sI16; // Signed Integer 16-bits typedef unsigned long uI32; // Unsigned Integer 32-bits typedef signed long sI3
Краткое содержание страницы № 17
Direct Drive LCD Design Guide 4.1.3 LCDInit Direct Driver Initialization. Format LCDErrorType LCDInit(void); Parameters none Return Values 0 if successful, non-zero if failure. Properties Prototyped in file ”DirectLCD.h” Implemented in file “DirectLCD_SBF.c” for H8S family or “DirectLCD_XBCFT.c” for H8SX family. Description This function is used to initialize the hardware necessary for the Direct Drive LCD to execute. This function uses the configuration macros to set u
Краткое содержание страницы № 18
Direct Drive LCD Design Guide 4.1.4 LCDBacklight Direct Driver backlight control. Format void LCDBacklight(int state); Parameters state Requested backlight state 0=off, non-0 = on. Return Values None Properties Prototyped in file ”DirectLCD.h” Implemented in file “DirectLCD_SBF.c” for H8S family or “DirectLCD_XBCFT.c” for H8SX family. Description This function is used to control the state of the LCD backlight. Example { LCDBacklight(1); /* turn backlight on */
Краткое содержание страницы № 19
Direct Drive LCD Design Guide 4.1.5 LCDSetFrameRate Configure the vertical refresh rate of the LCD panel. Format sI16 LCDSetFrameRate(sI16 rate); Parameters rate Requested refresh rate (in Hz) Return Values Negative value indicates rate was not able to be achieved with system configuration. Positive value indicates success, returned value will be the percent of MCU access time available. Properties Prototyped in file ”DirectLCD.h” Implemented in file “DirectLCD_SBF.c” for
Краткое содержание страницы № 20
Direct Drive LCD Design Guide 4.1.6 LCDGetFrameRate Request the vertical refresh rate of the LCD panel. Format sI16 LCDGetFrameRate(void); Parameters none Return Values Current frame rate in Hz. Properties Prototyped in file ”DirectLCD.h” Implemented in file “DirectLCD_SBF.c” for H8S family or “DirectLCD_XBCFT.c” for H8SX family. Description Request the current vertical refresh rate of the LCD panel. Example { sI16 old_rate = LCDGetFrameRate(); /* get frame rate