good evening to every one..i am new to this website..i want to know how to use 10 inch TFT display and LVDS colour formet??? can anyone help me..? thanks advance
Welcome to the community! This thread might help you out a bit Re: Cortex-M0 or Cortex-M3? jensbauer might be able to help out a bit too..
Hi viju28.
I'm sorry for the late response; I'm on vacation at the moment.
Have you decided which chip you want to use yet ?
I know you can configure the LPC1788 fairly easy (The same goes for LPC4088).
Those use RGB colors and support both TFT and STN displays.
A common resolution for TFT displays is 480 x 272 pixels in 8, 16 or 24 bit mode.
I've tried setting it up for 512 x 384 colors, 60 Hz, in 16 bit mode myself.
If you already have a board, I might be able to help you a bit further, if you can tell me the name of the specific chip.
Hi..jensbauer..
thanks for ur ,,response.actually i am using lpc 1788 chip.(arm cortex m3)..
and i am using 10 inch TFT display(1024*600)pixels..and actually i need the front porch and back porch value for the TFT lcd display.thanks advance..
I think it might be best to try either 16 colors per pixel or 256 colors per pixel first with this resolution.
Safest bet is that 16 colors per pixel (eg. 4 bits per pixel) would work.
Next thing is to find a suitable vertical blanking frequency. Normally a 60Hz frequency is good for VGA-style resolutions, but since your resolution is quite high for the LCD controller, it may be better to start by using a 30Hz resolution.
Your 10" TFT display have some minimum and maximum values I think. Horizontal Frequencies and Vertical Frequencies. These numbers are important, in order to find suitable values for the front-porch, vertical sync pulse, back porch and active video.
But you could try the following values (which are my guesses):
VSP: 4 (Vertical Sync Pulse)
VBP: 23 (Vertical Back Porch)
VAV: 600 (Vertical Active Video)
VFP: 1 (Vertical Front Porch)
HSP: 136 (Horizontal Sync Pulse)
HBP: 160 (Horizontal Back Porch)
HAV: 1024 (Horizontal Active Video)
HFP: 24 (Horizontal Front Porch)
Note: You should make sure your display can handle the resolution before you try it out.
Unfortunately, I am not able to try out these things myself; I don't have the display, and since I'm also on vacation, I can't even check if the values can be fed into the LCD controller; but it's a fair guess.
thank you for ur response jensbauer..its working ...partially... but not fully..i also got some 10" (1024*600) data sheet...so trying ..the main problem is i dont have proper data sheet for my TFT lcd..:(...so if u know tell me..and one doubt what is use of vertical blanking frequency..?
I do not know which display you have, but from the 1024x600 resolution, I calculated the data above.
The purpose of the vertical blanking frequency, is to tell the display that a new picture is being drawn; eg. that the screen must start drawing the first pixel after the vertical sync signal.
The higher the vertical blanking frequency is, the quicker updates and more smooth animations you will get.
If you have a name of the display manufacturer and the display itself, try searching the net for these two. If you are using Google, you can search for this line...
manufacturerName displayName datasheet filetype:pdf
-Where you replace the two first words, and you may find the datasheet.
Otherwise, you should ask the shop, where you bought the display, if they can provide a datasheet.
hi ..jensbauer ..thanks for ur reply ..i am also searching that proper data sheet only..my HSD display model is WY101ML308HS18A ..10.1" Inch(16:9) 1024*600 pixels..if u have any idea tell me..
I've found a display, which supports 1024x600; it's not the same display, but it might be compatible, regarding sync lengths and signals.
Hi jensbauer.,
first thanks for your response..i am new for TFT lcd.I attached my details.If u got any idea tell me.i am facing problem in 10" TFT lcd interfacing.problem is lcd back light is flikering.i attached a file see that.
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.
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_BLUE COLOUR(0,0,128) #define GREY COLOUR(61,60,59) #define COMM_BOARDER_GREY COLOUR(121,120,119) #define RTC_GREY COLOUR(0,0,50) #define BLACK_Grey COLOUR(10,10,10) #define SILVER COLOUR(192,192,192) #define TOMATO_RED COLOUR(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 HORIZONTAL 0XFF #define VERTICAL 0X00 /******************************************************************************* * 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.
hello friends.
is it possible to use the 10.1" TFT lcd by using Htotal,Hac,Vtotal,Vac and Vsync.without using horizontal front porch,back porch value and pulse width ?
if its possible how?
"Guessing" the Front Porch, Back Porch and Sync Pulse timings are often difficult, but I'm positive you'll get through it. First time is always the hardest one.
I just got back from vacation, so my reply is a bit late. I'll try replying the best I can, so that if you're still stuck, you may find the answer.
Normally, you will need the 4 timing values for both the Horizontal and the Vertical directions.
The Horizontal/Vertical Active Video is the "visible" resolution; the one you normally mention, when you speak about visible pixels; for example 1024 x 600 in this case.
The Horizontal/Vertical Sync Pulse time is required for the screen to find out when to synchronize the pixels and lines.
The time between the Sync Pulse and the Active Video is also needed, so that the picture can be adjusted left/right/up/down. You can see it as a "black border area".
On the image shown, the yellow area is the Vertical Sync Pulse.
The white area is the Horizontal Sync Pulse; this overlaps a part of the Vertical Sync Pulse, which means both pulses happen in that area.
The black (grey) areas represents the Back Porch, the blue areas represents the Front Porch.
The ducklings are in the Active Video area.
(The illustration is not 100% correct, but it should give you a fair idea about the placements of the timings)
So first you'll have the Vertical Sync Pulse, then the Vertical Back Porch, the Vertical Active Video and finally the Vertical Front Porch.
For each pixel-line you'll have the Horizontal Sync Pulse, then the Horizontal Back Porch, the Horizontal Active Video and finally the Horizontal Front Porch.
The Front Porch is usually smaller than the Back Porch.
In your case, you know the total number of pixels per line and the total number of lines per frame:
Typical values are 1344 and 625.
You also know the number of active pixels/lines: 1024 and 600. Subtract these from the total...
1344 pixels - 1024 pixels = 320 pixels
625 lines - 600 lines = 25 lines
Usually Vertical Sync Pulse is 2 or 3 lines. So assuming it's one of those, we'll get 23 lines left for front and back porch.
The front porch is usually smaller than the sync pulse, so we'll assume vertical front porch is 1 line, leaving 22 lines for the vertical back porch.
For the horizontal values.... These should usually be divisible by 8.
Often (but not always), the Horizontal Back Porch is half of the pixels left over from the above subtraction; eg. (1344 - 1024) / 2.
So assuming the front porch is 160 pixels, we'll try giving the back porch 24 pixels and the sync pulse 136 pixels.
So we'll have something like...
VSP: 2 lines
VBP: 22 lines
VAV: 600 lines
VFP: 1 line
HSP: 136 pixels
HBP: 160 pixels
HAV: 1024 pixels
HFP: 24 pixels
Sometimes the horizontal values must be divisible by 16, so you may need to make HFP either 16 pixels and HSP 144 pixels OR HFP 32 pixels and HSP 128 pixels.
I believe you should try and make the pixel clock as low as possible (44 MHz); since that is easier for the LPC's LCD controller to handle.
Hi jensbauer .,
thanks for your response.your explanation was very useful to me.i tried your all values.in some case character is displaying in TFT screen But LCD is flickering (not character background pixel) .i cant find the problem whether clock or LVDS convertor?Yes i am using LVDS CONVERTOR to convert from RGB to LVDS.i am using sn75lvds83b.link is www.ti.com/lit/ds/symlink/sn75lvds83b.pdf.
can you help me what will be the problem for lcd flickering?
It's difficult to say what's causing the flickering (I've been walking on thin ice for a while, as I have no experience with LVDS and only very little with external LCD/TFT displays, except for VGA monitors).
Flickering might be due to problems with one of the sync signals. There are two significant parameters for one sync signal:
1: The ON time.
2: The OFF time.
Usually you'll look at the ON time only, but the OFF time is just as important.
Make sure that the total time, is within the required limits.
Those limits are Htotal and Vtotal. The ON time + OFF time must then be between 1320 pixels and 1362 pixels for the horizontal sync pulse, and it must be between 612 lines and 638 lines for the vertical sync pulse.
If the timings are outside those limits, you will definitely get flickering or no picture.
It's also a very good idea to keep an eye on the frequencies; if you have an oscilloscope or a frequency meter, then measure the Horizontal and Vertical frequencies.
The vertical frequency is usually the easiest one to measure. Vertical frequency must be between 55 Hz and 65 Hz
The horizontal frequency must be between 44.4 MHz and 65.2 MHz.
Usually, the first thing I do, is to get the HSync timing in range (I measure this using an oscilloscope).
After getting the HSync correct, it's usually no problem getting the VSync correct.
Then I move on to checking the frequencies.
After correcting the frequencies (if necessary), I move on to finding the top of the active video area. I usually output 16 pixels in the "middle center" of the screen, and move the line up, until it's hidden.
From that point on, I suggest changing to 1 set pixel, skipping one pixel and 14 set pixels.
I move those left until the one pixel disappears, then I've found the left side of the screen.
When "moving" the line up, you'll need to subtract lines from the back porch and add the same number of lines to the front porch.
Eg. if you subtract 32 lines from VBP, then add 32 lines to VFP.
Here's a real good pixel-pattern for finding the top/left/bottom/right sides (the green pixels are those that are 'set'):
-Using this pattern, you will easily be able to see when the square moves outside the visible area.
Since you're using the LCD-controller, it's probably best to place it in the beginning of the video RAM, then you can use the front/back porch parameters to move it around (eg. start with the max. back porch and minimum front porch values; the 'square' should be visible somewhere in the top/left quadrant of the display).
Unfortunately, it seems the video didn't make it. (you can edit your previous post, and try adding it again).
If the flickering is caused by the VSync / HSync timings being incorrect, my guess is that this could also be the reason why the pixel is not "pure white" but gray.
Yes, we know the size of the active area, but we do not know the position. Finding the position of the active area will give us the usable values for the front porch and back porch in both horizontal and vertical directions.
+Hi jensbauer,
the Vsync and Hsync may be the problem for flickering.and one more thing friend i thought we cant shift the pixel ,if we want we can shift the pixel location so the pixel can blink in that particular location.if you keep on moving left or right it will be invisible because it ill go to inactive area .
sir what is the use of finding active area?we already know active area is 1024*600.so if we want to display the image in horizontal x vertical (e.x) 0x10 location mean it will display there .
i thought the problem is Hsync,Vsync value and RGB TO LVDS convertor also .because in RGB interface there is no problem ,in LVDS interface only lcd its flickering and color is changing(mean if we set white=(255,255,255),Its displaying grey block=(60,60,60 ).
.i attached video clip just see and tell me.if u have any idea.