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
Committer:
RobertFischer
Date:
Fri May 30 08:43:07 2014 +0000
Revision:
0:f7f2e9764273
Test for new controller lib SSD1963. Still some scrambled output

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RobertFischer 0:f7f2e9764273 1 #include "mbed.h"
RobertFischer 0:f7f2e9764273 2 //#include "ID12RFID.h"
RobertFischer 0:f7f2e9764273 3 //#include "ssd1289.h"
RobertFischer 0:f7f2e9764273 4 //#include "hx8352a.h"
RobertFischer 0:f7f2e9764273 5 #include "ssd1963.h"
RobertFischer 0:f7f2e9764273 6
RobertFischer 0:f7f2e9764273 7 //ID12RFID rfid(p10); // uart rx
RobertFischer 0:f7f2e9764273 8 //HX8340S_LCD lcd( p9, p14, p13, p11 ); //Screen initialization
RobertFischer 0:f7f2e9764273 9 // HX8340S_LCD( PinName CS, PinName RESET, PinName SCL, PinName SDI, PinName BL = NC, backlight_t blType = Constant, float defaultBackLightLevel = 1.0 );
RobertFischer 0:f7f2e9764273 10
RobertFischer 0:f7f2e9764273 11 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
RobertFischer 0:f7f2e9764273 12 // create the lcd instance
RobertFischer 0:f7f2e9764273 13 //>>>>>>>>>>>>>>>>>>SSD1289_LCD lcd( PB_1, PB_0, PB_7, PB_6, &dataBus, PB_13, PB_2 ); // control pins and data bus
RobertFischer 0:f7f2e9764273 14 //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 );
RobertFischer 0:f7f2e9764273 15 //HX8352A_LCD lcd( PB_1, PB_0, PB_7, PB_6, &dataBus, PB_13, PB_2); // control pins and data bus
RobertFischer 0:f7f2e9764273 16 SSD1963_LCD lcd( PB_1, PB_0, PB_7, PB_6, &dataBus, PB_13, PB_2); // control pins and data bus
RobertFischer 0:f7f2e9764273 17
RobertFischer 0:f7f2e9764273 18
RobertFischer 0:f7f2e9764273 19 int main()
RobertFischer 0:f7f2e9764273 20 {
RobertFischer 0:f7f2e9764273 21 //printf("Hello World\n");
RobertFischer 0:f7f2e9764273 22 // initialize display - place it in standard portrait mode and set background to black and
RobertFischer 0:f7f2e9764273 23 // foreground to white color.
RobertFischer 0:f7f2e9764273 24 lcd.Initialize();
RobertFischer 0:f7f2e9764273 25 lcd.FillScreen(COLOR_RED);
RobertFischer 0:f7f2e9764273 26 lcd.SetBackground(COLOR_BLUE);
RobertFischer 0:f7f2e9764273 27 lcd.SetForeground(COLOR_WHITE);
RobertFischer 0:f7f2e9764273 28 lcd.DrawRoundRect(20,20,60,60,COLOR_GREEN);
RobertFischer 0:f7f2e9764273 29 lcd.DrawRoundRect(80,80,120,120,COLOR_GREEN);
RobertFischer 0:f7f2e9764273 30 lcd.DrawRoundRect(160,160,200,200,COLOR_GREEN);
RobertFischer 0:f7f2e9764273 31 lcd.DrawRoundRect(80,20,120,60,COLOR_GREEN);
RobertFischer 0:f7f2e9764273 32 lcd.DrawRoundRect(160,20,200,60,COLOR_GREEN);
RobertFischer 0:f7f2e9764273 33 lcd.DrawLine(0,0,239,399,COLOR_BLUE);
RobertFischer 0:f7f2e9764273 34 lcd.DrawCircle(40,40,29,COLOR_BLUE);
RobertFischer 0:f7f2e9764273 35 lcd.DrawCircle(190,360,29,COLOR_YELLOW); // set current font to the smallest 8x12 pixels font.
RobertFischer 0:f7f2e9764273 36 //lcd.SetFont( &TerminusFont );
RobertFischer 0:f7f2e9764273 37 // print something on the screen
RobertFischer 0:f7f2e9764273 38 //lcd.Print( "aa", 200, 225 ); // align text to center horizontally and use starndard colors
RobertFischer 0:f7f2e9764273 39 lcd.SetFont( &TerminusFont );
RobertFischer 0:f7f2e9764273 40 lcd.Print( "R", 0, 0 ); // align text to center horizontally and use starndard colors
RobertFischer 0:f7f2e9764273 41 lcd.Print( "R", 8, 0 ); // align text to center horizontally and use starndard colors
RobertFischer 0:f7f2e9764273 42 lcd.Print( "Hello mbed", 200, 130 ); // align text to center horizontally and use starndard colors
RobertFischer 0:f7f2e9764273 43 lcd.DrawRoundRect(20,80,60,120,0xFFFF);
RobertFischer 0:f7f2e9764273 44
RobertFischer 0:f7f2e9764273 45 lcd.DrawRoundRect(20,140,60,180,0xFFFF);
RobertFischer 0:f7f2e9764273 46
RobertFischer 0:f7f2e9764273 47 while(1) {
RobertFischer 0:f7f2e9764273 48
RobertFischer 0:f7f2e9764273 49 }
RobertFischer 0:f7f2e9764273 50 }
RobertFischer 0:f7f2e9764273 51
RobertFischer 0:f7f2e9764273 52
RobertFischer 0:f7f2e9764273 53
RobertFischer 0:f7f2e9764273 54
RobertFischer 0:f7f2e9764273 55
RobertFischer 0:f7f2e9764273 56
RobertFischer 0:f7f2e9764273 57