|
Post by MangyDog on Apr 5, 2020 7:45:10 GMT -8
Hi I really need some help figuring out the correct timing settings for ili9341 based displays, I adapted James 9488 guide to run on 9341 displays but, I cant figure out the propper timings. I spent ages going through trial and error to come up with these settings GD.wr16(REG_HCYCLE, 302);
GD.wr16(REG_HOFFSET, 62);
GD.wr16(REG_HSYNC0, 0);
GD.wr16(REG_HSYNC1, 10);
GD.wr16(REG_VCYCLE, 408);
GD.wr16(REG_VOFFSET, 0);
GD.wr16(REG_VSYNC0, 0);
GD.wr16(REG_VSYNC1, 2);
GD.wr16(REG_SWIZZLE, 2);
GD.wr16(REG_PCLK_POL, 1);
GD.wr16(REG_HSIZE, 240);
GD.wr16(REG_VSIZE, 320);
GD.wr16(REG_CSPREAD, 0);
GD.wr16(REG_DITHER, 0);
GD.wr16(REG_PCLK, 8);
//GD.wr16(REG_ROTATE, 3);
But its unstable and seems to crash the ILI chip after a minute or so once it warms up. It also seems to flicker. Going through the ili9341 datasheet I find this on porch and dot timings.  Using this i tested out these timings GD.wr16(REG_HCYCLE, 390);
GD.wr16(REG_HOFFSET, 20);
GD.wr16(REG_HSYNC0, 0);
GD.wr16(REG_HSYNC1, 10);
GD.wr16(REG_VCYCLE, 326);
GD.wr16(REG_VOFFSET, 0);
GD.wr16(REG_VSYNC0, 0);
GD.wr16(REG_VSYNC1, 2);
GD.wr16(REG_SWIZZLE, 2);
GD.wr16(REG_PCLK_POL, 1);
GD.wr16(REG_HSIZE, 240);
GD.wr16(REG_VSIZE, 320);
GD.wr16(REG_CSPREAD, 0);
GD.wr16(REG_DITHER, 0);
GD.wr16(REG_PCLK, 8);
GD.wr16(REG_ROTATE, 3);
But this simply didnt work... I checked to see how the settings in james guide compared to the 9488 datasheet but I just couldnt see any corrilation so i think i might be barking up the wrong tree so to speak... Does anyone know how I can figure out proper stable settings?
|
|
|
Post by MangyDog on Apr 5, 2020 7:56:15 GMT -8
For quick reference these are the settings james uses for the 9488 GD.wr16(REG_HCYCLE, 400 ); GD.wr16(REG_HOFFSET, 40 ); GD.wr16(REG_HSYNC0, 0 ); GD.wr16(REG_HSYNC1, 10 ); GD.wr16(REG_VCYCLE, 500 ); GD.wr16(REG_VOFFSET, 10 ); GD.wr16(REG_VSYNC0, 0 ); GD.wr16(REG_VSYNC1, 5 ); GD.wr16(REG_SWIZZLE, 2 ); GD.wr16(REG_PCLK_POL, 1 ); GD.wr16(REG_HSIZE, 320 ); GD.wr16(REG_VSIZE, 480 ); GD.wr16(REG_CSPREAD, 1 ); GD.wr16(REG_DITHER, 1 ); GD.wr16(REG_PCLK, 5 );
|
|
|
Post by MangyDog on Apr 6, 2020 9:38:02 GMT -8
Ok currently got these settings GD.wr16(REG_HCYCLE, 302); GD.wr16(REG_HSIZE, 240); GD.wr16(REG_HOFFSET, 62); GD.wr16(REG_HSYNC0, 0); GD.wr16(REG_HSYNC1, 10);
GD.wr16(REG_VCYCLE, 326); GD.wr16(REG_VSIZE, 320); GD.wr16(REG_VOFFSET, 2); GD.wr16(REG_VSYNC0, 0); GD.wr16(REG_VSYNC1, 6);
GD.wr16(REG_SWIZZLE, 2);
GD.wr16(REG_PCLK_POL, 0);
GD.wr16(REG_CSPREAD, 0); GD.wr16(REG_DITHER, 0); GD.wr16(REG_PCLK, 11); //70mhz base clock / 11 = 6.36 datasheet target 6.35
Its now running some what stable with no flicker. But I managed to kill one ft810 chip some how while going through various settings.
While this does seem to work and be stable im still not convinced this is correct... so if anyone can confirm one way or another.... That would be great. I dont want to end up damaging hardware with wrong settings.
|
|
|
Post by tftlcdcyg on Apr 6, 2020 20:06:24 GMT -8
The traditional position of the screen is placed horizontally on the longest side. In the configuration that you share at the end for the IL9341 you indicate an orientation of 240 px on the horizontal side and 320 px on the vertical. Although the screen I have NHD-FT813 (ILI9341) has a 3.5 "format, the resolution is 320x240. This is the screen I have: NHD-3.5-320240FT-CSXN-CTP. These are the timings indicated in the data sheet: 
|
|