Test of new controller lib SSD1963 and HX8352-A

Dependencies:   TFTLCD mbed

Test for the new libs. I implemented a driver lib for SSD1963 (TFT 272x480) and HX8352-A (TFT 240x400). Both displays have a 40 pin connector with same pin.

Image of the 240x400 board with HX8352-A /media/uploads/RobertFischer/hc8352_240x400.jpg

I used a ST Nucleo F401RE for testing. The 16bit databus is connected to port C (DB0->PC_0, DB1->PC_1...) Control pins: CS -> PB_1 Reset -> PB_0 RS -> PB_7 WR -> PB_6 RD -> PB_2 (not needed, there is no procedure for reading data from display controller) BL -> PB_13 (PWM back lit control. Not tested yet.)

Both displays need a 16 bit bus for command and data and 4 or 5 pins for control.

I discovered some strange problems with my Nucleo board. It seems there is a power issue using this quit big displays. I had some wired output on display. After stetting jumper to E5V and powering the board from a 5V supply, it looks very good.

TODO:

  • Testing the touch sensor
  • Wiring and testing SDcard connector
  • Testing with a Freescale FRDM board
Revision:
0:f7f2e9764273
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 30 08:43:07 2014 +0000
@@ -0,0 +1,57 @@
+#include "mbed.h"
+//#include "ID12RFID.h"
+//#include "ssd1289.h"
+//#include "hx8352a.h"
+#include "ssd1963.h"
+
+//ID12RFID rfid(p10); // uart rx
+//HX8340S_LCD lcd( p9, p14, p13, p11 ); //Screen initialization
+// HX8340S_LCD( PinName CS, PinName RESET, PinName SCL, PinName SDI, PinName BL = NC, backlight_t blType = Constant, float defaultBackLightLevel = 1.0 );
+
+BusOut dataBus( PC_0, PC_1, PC_2, PC_3, PC_4, PC_5, PC_6, PC_7, PC_8, PC_9, PC_10, PC_11, PC_12, PC_13, PC_14, PC_15 ); // 16 pins
+// create the lcd instance
+//>>>>>>>>>>>>>>>>>>SSD1289_LCD lcd( PB_1, PB_0, PB_7, PB_6, &dataBus, PB_13, PB_2 ); // control pins and data bus
+//SSD1289_LCD( PinName CS, PinName RESET, PinName RS, PinName WR, BusOut* DATA_PORT, PinName BL = NC, PinName RD = NC, backlight_t blType = Constant, float defaultBackLightLevel = 1.0 );
+//HX8352A_LCD lcd( PB_1, PB_0, PB_7, PB_6, &dataBus, PB_13, PB_2); // control pins and data bus
+SSD1963_LCD lcd( PB_1, PB_0, PB_7, PB_6, &dataBus, PB_13, PB_2); // control pins and data bus
+
+
+int main()
+{
+    //printf("Hello World\n");
+    // initialize display - place it in standard portrait mode and set background to black and
+    //                      foreground to white color.
+    lcd.Initialize();
+    lcd.FillScreen(COLOR_RED);
+    lcd.SetBackground(COLOR_BLUE);
+    lcd.SetForeground(COLOR_WHITE);
+    lcd.DrawRoundRect(20,20,60,60,COLOR_GREEN);
+    lcd.DrawRoundRect(80,80,120,120,COLOR_GREEN);
+    lcd.DrawRoundRect(160,160,200,200,COLOR_GREEN);
+    lcd.DrawRoundRect(80,20,120,60,COLOR_GREEN);
+    lcd.DrawRoundRect(160,20,200,60,COLOR_GREEN);
+    lcd.DrawLine(0,0,239,399,COLOR_BLUE);
+    lcd.DrawCircle(40,40,29,COLOR_BLUE);
+    lcd.DrawCircle(190,360,29,COLOR_YELLOW);    // set current font to the smallest 8x12 pixels font.
+    //lcd.SetFont( &TerminusFont );
+    // print something on the screen
+    //lcd.Print( "aa", 200, 225 ); // align text to center horizontally and use starndard colors
+    lcd.SetFont( &TerminusFont );
+    lcd.Print( "R", 0, 0 ); // align text to center horizontally and use starndard colors
+    lcd.Print( "R", 8, 0 ); // align text to center horizontally and use starndard colors
+    lcd.Print( "Hello mbed", 200, 130 ); // align text to center horizontally and use starndard colors
+    lcd.DrawRoundRect(20,80,60,120,0xFFFF);
+
+    lcd.DrawRoundRect(20,140,60,180,0xFFFF);
+
+    while(1) {
+
+    }
+}
+
+
+
+
+
+
+