Embedded Artists LCD Board TFT 480x272 EA-LCD-004 EA-LCD-004 Datenbogen
Produktcode
EA-LCD-004
LCD Board - User’s Guide
Page 13
Copyright 2012 © Embedded Artists AB
4.4 Software Driver
A general software driver has been created to in order to make it simple and non-complex to work with
different LCD:s. This section contains a very brief description of the structure. The code is the general
documentation in itself, simply because the software will likely be updated
The software driver package (a zip-file) is downloaded from Embedded Artists support page for the
The software driver package (a zip-file) is downloaded from Embedded Artists support page for the
LCD Board. The support site is available after registration of the product serial key that comes with
purchase of an LCD Board. The package shall be unzipped in the same directory as the sample
purchase of an LCD Board. The package shall be unzipped in the same directory as the sample
applications for the LPC1788 Developer's Kit. The default name of that directory is oem_lpc1788. The
sample application is called s_display_board.
There is a support library called Lib_Displays. The code in this library contains all low-level details.
The I2C-E2PROM contains configuration information. The I2C address of the memory is 0x56
(1.0.1.0.1.1.0.RW). An application can begin with detecting if an I2C-E2PROM is present on this
There is a support library called Lib_Displays. The code in this library contains all low-level details.
The I2C-E2PROM contains configuration information. The I2C address of the memory is 0x56
(1.0.1.0.1.1.0.RW). An application can begin with detecting if an I2C-E2PROM is present on this
address. If so, an LCD Board is attached to the system and the LCD controller and graphical
application can be started.
Some of the parameters are just to copy directly into the LCD controller of the LPC processors. Other
Some of the parameters are just to copy directly into the LCD controller of the LPC processors. Other
information is stored in readable command strings. The configuration information stored is:
Magic number to detect that information has been stored.
Name of LCD and manufacturer in readable strings.
LCD controller setup, including timing parameters. Can be directly copied to LCD controller
registers.
registers.
Init sequence command string. The string must be interpreted by the software driver.
Power down command string. The string must be interpreted by the software driver.
Parameters related to touch screen.
The general structure of an application utilizing the LCD Board can be found in main() in main.c of the
s_display_board sample application. A call to ea_lcdb_open(…) will read the configuration e2prom
s_display_board sample application. A call to ea_lcdb_open(…) will read the configuration e2prom
and initialize the application. A call to ea_lcdb_getLcdParams(..) will get the retrieved parameters,
where the main parameters are width and height of the display.
There is also a function for power down of the LCD. Most LCD:s have strict requirements regarding
There is also a function for power down of the LCD. Most LCD:s have strict requirements regarding
power-up and power-down when it comes to supply sequencing and control signals. It is important to
adhere to these requirements in order not to damage the display or reducing its performance or
lifetime.
lifetime.
4.4.1
Note about 4.3 inch LCD (EA-LCD-004)
The code listing below contains the LCD controller settings for the controller that is used on many LPC
processors. It also lists parameters about the touch screen and startup/power down behavior for the
general driver that Embedded Artists has created.
static const LCD_PARAM_T lcdParams =
{
40, /* Horizontal back porch */
5, /* Horizontal front porch */
2, /* HSYNC pulse width */
480, /* Pixels per line */
8, /* Vertical back porch */
8, /* Vertical front porch */
2, /* VSYNC pulse width */
272, /* Lines per panel */
0, /* Invert output enable */
0, /* Do not invert panel clock */
1, /* Invert HSYNC */
{
40, /* Horizontal back porch */
5, /* Horizontal front porch */
2, /* HSYNC pulse width */
480, /* Pixels per line */
8, /* Vertical back porch */
8, /* Vertical front porch */
2, /* VSYNC pulse width */
272, /* Lines per panel */
0, /* Invert output enable */
0, /* Do not invert panel clock */
1, /* Invert HSYNC */