summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-12-09 01:59:18 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-12-09 01:59:18 +0000
commit5e2515ed3229eaf608fe5135db2d473694bf600f (patch)
tree83f64b3c041565cb33be609874a092a8f4c9c1e0
parent14f4f5c4cb34f594624263cd10ccaba7137f83fe (diff)
downloadnuttx-5e2515ed3229eaf608fe5135db2d473694bf600f.tar.gz
nuttx-5e2515ed3229eaf608fe5135db2d473694bf600f.tar.bz2
nuttx-5e2515ed3229eaf608fe5135db2d473694bf600f.zip
Fix LCD fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3167 42af7a65-404d-4744-a932-0658087f49c3
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/README.txt40
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/src/lpc1766stk_internal.h2
-rwxr-xr-xnuttx/drivers/lcd/nokia6100.c6
3 files changed, 44 insertions, 4 deletions
diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt
index 657c46fe5..7618766b0 100755
--- a/nuttx/configs/olimex-lpc1766stk/README.txt
+++ b/nuttx/configs/olimex-lpc1766stk/README.txt
@@ -122,6 +122,46 @@ Olimex LPC1766-STK development board
serial driver). Other LPC17xx boards with the same clocking will run at
115200.
+ LCD
+ ---
+
+ The LPC1766-STK has a Nokia 6100 132x132 LCD and either a Phillips PCF8833
+ or an Epson S1D15G10 LCD controller. The NuttX configuration may have to
+ be adjusted depending on which controller is used with the LCD. The
+ "LPC1766-STK development board Users Manual" states tha the board features
+ a "LCD NOKIA 6610 128x128 x12bit color TFT with Epson LCD controller."
+ But, referring to a different Olimex board, "Nokia 6100 LCD Display
+ Driver," Revision 1, James P. Lynch ("Nokia 6100 LCD Display Driver.pdf")
+ says:
+
+ "The major irritant in using this display is identifying the graphics
+ controller; there are two possibilities (Epson S1D15G00 or Philips
+ PCF8833). The LCD display sold by the German Web Shop Jelu has a Leadis
+ LDS176 controller but it is 100% compatible with the Philips PCF8833).
+ So how do you tell which controller you have? Some message boards have
+ suggested that the LCD display be disassembled and the controller chip
+ measured with a digital caliper – well that’s getting a bit extreme.
+
+ "Here’s what I know. The Olimex boards have both display controllers
+ possible; if the LCD has a GE-12 sticker on it, it’s a Philips PCF8833.
+ If it has a GE-8 sticker, it’s an Epson controller. The older Sparkfun
+ 6100 displays were Epson, their web site indicates that the newer ones
+ are an Epson clone. Sparkfun software examples sometimes refer to the
+ Philips controller so the whole issue has become a bit murky. The
+ trading companies in Honk Kong have no idea what is inside the displays
+ they are selling. A Nokia 6100 display that I purchased from Hong Kong
+ a couple of weeks ago had the Philips controller."
+
+ The LCD connects to the LPC1766 via SPI and two GPIOs. The two GPIOs are
+ noted above:
+
+ P1.21 is the SPI chip select, and
+ P3.25 is the LCD reset
+ P3.26 is PWM1 output used to control the backlight intensity.
+
+ MISO0 and MOSI0 are join via a 1K ohm resistor so the LCD appears to be
+ write only.
+
Development Environment
^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/configs/olimex-lpc1766stk/src/lpc1766stk_internal.h b/nuttx/configs/olimex-lpc1766stk/src/lpc1766stk_internal.h
index b1a461a24..3d84f4bda 100755
--- a/nuttx/configs/olimex-lpc1766stk/src/lpc1766stk_internal.h
+++ b/nuttx/configs/olimex-lpc1766stk/src/lpc1766stk_internal.h
@@ -168,7 +168,7 @@
* P3[26]/STCLK/MAT0[1]/PWM1[3] 26 LCD_BL (PWM1)
*/
-#define LPC1766STK_LCD_CS (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT1 | GPIO_PIN21)
+#define LPC1766STK_LCD_CS (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN21)
#define LPC1766STK_LCD_RST (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT3 | GPIO_PIN25)
#define LPC1766STK_LCD_BL GPIO_PWM1p3_3
#define GPIO_PWM1p3 GPIO_PWM1p3_3
diff --git a/nuttx/drivers/lcd/nokia6100.c b/nuttx/drivers/lcd/nokia6100.c
index 36e92007c..008fd297b 100755
--- a/nuttx/drivers/lcd/nokia6100.c
+++ b/nuttx/drivers/lcd/nokia6100.c
@@ -474,7 +474,7 @@ static struct nokia_dev_s g_lcddev =
* P4: 0: Dispersion P40= 1: Non-dispersion
*/
-#if CONFIG_NOKIA6100_BPP == 12
+#if 1 // CONFIG_NOKIA6100_BPP == 12
static const uint8_t g_disctl[] =
{
S1D15G10_DISCTL, /* Display control */
@@ -543,9 +543,9 @@ static const uint8_t g_datctl[] =
0, /* RGB->RGB */
#endif
#if CONFIG_NOKIA6100_BPP == 8
- DATCTL_16GRAY_A /* Selects 16-bit color, Type A */
-#elif CONFIG_NOKIA6100_BPP == 12
DATCTL_8GRAY /* Selects 8-bit color */
+#elif CONFIG_NOKIA6100_BPP == 12
+ DATCTL_16GRAY_A /* Selects 16-bit color, Type A */
#else
# error "16-bit mode not yet implemented"
#endif