10 inch TFT lcd display (1024*600)pixel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

10 inch TFT lcd display (1024*600)pixel

1,130 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vvijayan75 on Wed Jul 16 00:22:59 MST 2014
Hi..
      i need horizontal front porch and back porch value for10 inch TFT lcd display ..and i am using lpc 1788 ic.
      if any one have any idea tell me..thanks.
Labels (1)
0 Kudos
8 Replies

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hmrasa on Thu Oct 30 02:09:12 MST 2014
Hi,
I started driving 10.1 Inch LCD.
I used LPC1788 and converted parallel RGB data to LVDS by SN75LVDS83B, but I didn't succeed to light up the display.
Is there any schematic and code to help me?

Hamze
0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vvijayan75 on Wed Jul 23 05:00:53 MST 2014
Hi..rocketdawg,
                             first thanks for your response..i am new for TFT lcd.so try to help me.

1)my TFT pannel WY101ML308HS18A is a Active matrix TFT panels and it can support up to 24-bit bus.my controller is lpc1788 so it has inbuild lcd controller and it can support .

2)the controller has a parallel bit interface, the panel has a LVDS interface.But here i am using a SN75LVDS83B to convert the 24 bit parallel data into LVDS format..and sending to TFT lcd pannel via 4 bus.

[img=712x510]file:///H:/LVDS_serializer_example.png[/img]

3)i am using 256Mbit (16M x16) Synchronous DRAM for storing image buffer.i thought its enough..and  SDRAM WORKING GOOD .i cheked it.

4)i thought the problem is in lcd initialization.i need the exact value for hsync and vsync front porch,back porch ,horizontal and vertical pulse width value.

i attached my lcd initialization code .if you got any idea tell me..thanks advance.

code:
#include "LPC177x_8x.h"                 // Device header
#include "TFT_LCD.H"
#include "SDRAM.H"
#include "math.h"
#include "string.h"
#include "ASCII_LIB.h"
#include "UART.h"
#include "ICONS_LIB.h"

#include "TIMER.H"
uint8_t start_bit, stop_bit, start_bit_for_ascii11, stop_bit_for_ascii11;



#define WHITE         0xFFFFFF
#define BLACK         0x000000
#define BLUE          0xFF0000
#define RED           0x0000FF
#define GREEN         0x00FF00
#define YELLOW        0x00FFFF
#define PURPLE        COLOUR(127,0,255)
#define ORANGE        0X00A5FF//COLOUR(255,165,0)
#define LIGHTBLUE     COLOUR(23,208,255)
#define SKYBLUE      0xFFFF00//COLOUR(0,255,255)
#define NAVY_BLUECOLOUR(0,0,128)
#define GREY      COLOUR(61,60,59)
#define COMM_BOARDER_GREY      COLOUR(121,120,119)
#define RTC_GREYCOLOUR(0,0,50)
#define BLACK_GreyCOLOUR(10,10,10)
#define SILVERCOLOUR(192,192,192)
#define TOMATO_REDCOLOUR(255,99,71)
#define SPRING_GREEN COLOUR(0,255,127)


//#define COLOUR(R,G,B)((B<<16)|(G<<8)|(R<<0)) 

#define LCD_VRAM_BASE_ADDR ((unsigned long )SDRAM_BASE_ADDRESS)

#define TFT_H_SIZE           1024
#define TFT_H_PULSE          40//1//30--606088
#define TFT_H_FRONTPORCH     56//40//210
#define TFT_H_BACKPORCH      124//88//16

#define TFT_V_SIZE           600
#define TFT_V_PULSE          48//3//13--602223
#define TFT_V_FRONTPORCH     28//3//22
#define TFT_V_BACKPORCH      56//3//10

#define HORIZONTAL0XFF
#define VERTICAL0X00

/*******************************************************************************
* Function Name  : LCD_ClockDivide
* Description    : find closest clock divider to get the desired clock rate.
* Input          : None
* Output         : None
* Return         : None
* Attention : None
*******************************************************************************/
static uint32_t LCD_ClockDivide(uint32_t LCD_clock) 
{
uint32_t divide, result;

divide = 1;

while ( ( (120000000 / divide) > LCD_clock ) && (divide <= 0x3F) ) 
{
divide++;
}
if (divide <= 1) 
{
result = (1 << BCD_BIT);   /* Skip divider logic if clock divider is 1 */
} 
else 
{
result = 0 | (((divide >> 0) & 0x1F) | (((divide >> 5) & 0x1F) << 27));
}
return result;
}

/*************************************************************************************

1. Function name:glcd_initialization 
2. Purpose:glcd initialisation
3. Input :void
4. Return type:void
  
*************************************************************************************/
void glcd_initialization (){

unsigned long i;
unsigned long *pDst = (unsigned long *)LCD_VRAM_BASE_ADDR;
   
  IOCON_P0_4   = LCD_RED; 
IOCON_P0_5   = LCD_RED;  
 IOCON_P4_28  = LCD_RED;
 IOCON_P4_29  = LCD_RED; 
 IOCON_P2_6   = LCD_RED;  
 IOCON_P2_7   = LCD_RED;  
 IOCON_P2_8   = LCD_RED;  
 IOCON_P2_9   = LCD_RED;
   
 IOCON_P0_6   = LCD_GREEN;  
 IOCON_P0_7   = LCD_GREEN;
 IOCON_P1_20  = LCD_GREEN;  
 IOCON_P1_21  = LCD_GREEN;  
 IOCON_P1_22  = LCD_GREEN;  
 IOCON_P1_23  = LCD_GREEN;  
 IOCON_P1_24  = LCD_GREEN;  
 IOCON_P1_25  = LCD_GREEN; 

 IOCON_P0_8   = LCD_BLUE ;  
 IOCON_P0_9   = LCD_BLUE ;  
 IOCON_P2_12  = LCD_BLUE ;
 IOCON_P2_13  = LCD_BLUE ;
 IOCON_P1_26  = LCD_BLUE ;  
 IOCON_P1_27  = LCD_BLUE ;  
 IOCON_P1_28  = LCD_BLUE ;  
 IOCON_P1_29  = LCD_BLUE ; 

 IOCON_P2_2   = LCD_DCLK ; 
 IOCON_P2_5   = LCD_HSYNC;
 IOCON_P2_3   = LCD_VSYNC;
 IOCON_P2_4   = LCD_LCDDEN;
 IOCON_P2_0   = LCD_PWR;  

LPC_SC->PCONP |= 1<<0;

LCD_CTRL_REG &= 0; 
LCD_CTRL_REG |= (5<<1)|LCDTFT;
LCD_CTRL_REG &= ~BGR;
LCD_CTRL_REG &= ~LCDPWR;

LCD_POL_REG &= 0; 
LCD_POL_REG |=(1<<0);
LCD_POL_REG |=IVS|IHS;
LCD_POL_REG |= (TFT_H_SIZE-1)<<16;
LPC_LCD->POL |= (LCD_ClockDivide(72300000)<<0);

LPC_SC->LCD_CFG =0;// 120000000 / ((unsigned long) C_GLCD_PIX_CLK); 120 MHZ

/*Refresh time 41msec*/

LCD_TIMH_REG  &= 0; 
LCD_TIMH_REG |= (TFT_H_BACKPORCH - 1)<<24;
LCD_TIMH_REG |= (TFT_H_FRONTPORCH - 1)<<16;
LCD_TIMH_REG |= (TFT_H_PULSE - 1)<<8;//*same
LCD_TIMH_REG |= ((TFT_H_SIZE/16) - 1)<<2;//*same

LCD_TIMV_REG  &= 0;  
LCD_TIMV_REG |= (TFT_V_BACKPORCH)<<24;
LCD_TIMV_REG |= (TFT_V_FRONTPORCH)<<16;
LCD_TIMV_REG |= (TFT_V_PULSE - 1)<<10;
LCD_TIMV_REG |= TFT_V_SIZE - 1;

LCD_UPBASE_REG = LCD_VRAM_BASE_ADDR & ~7UL ;
LCD_LPBASE_REG = LCD_VRAM_BASE_ADDR & ~7UL ;  

for( i = 0; (TFT_H_SIZE * TFT_V_SIZE) > i; i++)
  *pDst++ = WHITE;

  for(i = 10000; i; i--);

//LCD_CTRL_REG |= LCDPWR| LCD_EN;
LCD_CTRL_REG |= LCDPWR;//| LCD_EN;
}

void lcd_powerenable(){

LCD_CTRL_REG |= LCD_EN;
}

void lcd_powerdisable(){

LCD_CTRL_REG &= LCD_EN;
}




int main()
{
int a=102,b=290;


sdram_initialization();
glcd_initialization ();
lcd_powerenable();
set_color(WHITE);
//init_timer1(1000);

while(1)
{
//lcd_color_pixel(102,190,RED);lcd_color_pixel(102,191,RED);lcd_color_pixel(102,192,RED);
lcd_14arial_writestr(a,b,"WELCOME",'B',RED,WHITE);// Its a function for displaying 14 Arial font character. a=horizontal location,b=vertical location,welcome =character should display in TFT lcd(accessing from ASCII Library), red=character color,white=screen border color.  
}
 }                  
  


i am also getting character in lcd but back light is flickering .need help..thanks advance.:)
0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Tue Jul 22 11:08:25 MST 2014
if you look at section 11.4.3
do you see any mention of LVDS interface panel support?
http://lmgtfy.com/?q=lvds

the controller has a parallel bit interface, the panel has a LVDS interface.  They do not work together.
so even if you get the front/back porch working, you will not be able to send data without some expensive serial/de-serial hardware.
you also need 2.4M byte external RAM for the image frame buffer.

so pick a better panel and get some external RAM

0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vvijayan75 on Tue Jul 22 00:15:35 MST 2014
Hi..Mr.Wolfgang..,
                      thank for your response..i have some doubt ..
                  1)what is the use of SDRAM bandwidth here.i am using SDRAM IN 60 MHZ FREQUENCY..
                  2) i am not going for video ..i just want to display the character, numbers and rectangle box..no need motion display..i thought if i need motion then only i have to concentrate on frames per second..mean (PAL/NTSC).
                  3)MY problem is i am not getting exact clock for TFT Panel,horizontal/vertical front porch and back porch value and pulse width..if u have any idea About the value tell me..                                                  


                                                                                                                                                     Thanks and Regards ,
                                                                                                                                                            VIJAYAN
0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Mon Jul 21 04:02:26 MST 2014
Is this the right display for the LPC1788?????

a) Have you checked the SDRAM bandwidth you need?
b) Have you checked how to create the LVDS serial data streams for the display?

The only mentioned video timings in the manual are: "compatible to PAL and NTSC".

regards

Wolfgang
0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vvijayan75 on Sun Jul 20 22:15:11 MST 2014
Hi...Martin84 ..,
              do u got any idea about this data sheet..? do u have any idea about front porch and back porch value..tell me ,,thanks advance..
0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vvijayan75 on Wed Jul 16 22:13:33 MST 2014
Hi..Martin..thank for ur response ..
                                             here i attached my data sheet for 10" TFT lcd and 1788 user manual also..i cant find the value for front porch and back porch..
                                             if u got any idea for horizantal and vertical front porch or back porch value tell me.thanks advance.
0 Kudos

981 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Martin84 on Wed Jul 16 01:24:11 MST 2014
Datasheet?
0 Kudos