JT035IPS02 640x480 display config

Having trouble with your GBZ build? Ask your questions here!
ZJO
Posts: 13
Joined: Sat May 23, 2020 6:31 am
Has thanked: 2 times
Been thanked: 2 times

Re: JT035IPS02 640x480 display config

Post by ZJO » Mon Oct 18, 2021 11:54 am

I'm in the UK but unfortunately I do not have a spare here – the screen arrived in 10 days or less from Aliex. I would be happy to donate some funds towards your screen for testing.

Hoping Kite will have some time to look at this soon. Until then, take it easy!

floppes
Posts: 55
Joined: Thu Apr 19, 2018 5:58 am
Has thanked: 2 times
Been thanked: 33 times

Re: JT035IPS02 640x480 display config

Post by floppes » Sat Oct 30, 2021 9:27 am

I ordered two displays and received them today. They work fine 8-)
1.jpg
1.jpg (445.53 KiB) Viewed 14112 times
2.jpg
2.jpg (373.83 KiB) Viewed 14112 times
3.jpg
3.jpg (526.27 KiB) Viewed 14112 times
I am using DPI_OUTPUT_FORMAT_18BIT_666_CFG2 together with dpi18_6.dtbo, therefore my config.txt looks like this:

Code: Select all

dtoverlay=dpi18_6
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=516118
dpi_timings=640 1 44 2 42 480 1 16 2 14 0 0 0 60 0 32000000 1
I like the overall image quality! Console text is very good to read.
The gamma setup is not very good. With the default Carbon theme in EmulationStation, the background seems completely black, even though it shows the console outlines in fine dark red lines.
The gamme can be usually setup through the SPI interface of the display. But for this display there is no documentation and they do not recommend changing the factory values.

ZJO
Posts: 13
Joined: Sat May 23, 2020 6:31 am
Has thanked: 2 times
Been thanked: 2 times

Re: JT035IPS02 640x480 display config

Post by ZJO » Sat Jan 01, 2022 7:07 am

Hi floppes - I am just revisiting this and saw your reply which I had missed!

Kite spent some time looking into this for me and I meant to post it back here but never got round to it.

Here's what he discovered:
Here's something you may not know about the implementation on the CS, for RGB666 we only use 6 pins per colour, but the LCD accepts 8. Due to historical reasons with dumb-er LCDs (the 320x240 is a very dumb LCD) in order to get MAX brightness out of it, I put the LCD lines D0 and D1 to GND, meaning they are ALWAYS 0, and then D2-D7 are the data lines.. this means when it requests black (00000000) the LCD shows black, and when you want white you get (11111100) which is ALMOST as fully white as it'll go (so, value 252 rather than 255). Otherwise, if I had used D0-D5 and left D6+D7 as GND, it would be 00000000 (black) and then 00111111 (value 63).. which is WAY off from white..

So, history and tech lesson #1 over.. what I think is happening, is that your LCD is configured by default to be a 'clever' RGB666 mode, meaning it only reads 6 data lines and converts them appropriately. This is usually GOOD because it means if you gave it 000000 (6bits) it converts to 00000000 (8bits) and 111111 (6bits) it converts properly to 11111111 (8bits) giving you the FULL range, unlike mine where my values go like 0, 4,8,12...248,252 (the thing above, where you see i'm losing a little of the range and a couple of colours). AND SO what I think is happening is that it's only reading D0-D5 and IGNORING D6+D7!
So it seems the display cannot work properly with the circuit sword PCB.

Just out of curiosity where is the dpi18_6.dtbo you mention? I've tried using your config.txt posted above and I'm not getting any image on the display at all. I would at least expect something to show up.

floppes
Posts: 55
Joined: Thu Apr 19, 2018 5:58 am
Has thanked: 2 times
Been thanked: 33 times

Re: JT035IPS02 640x480 display config

Post by floppes » Sun Jan 02, 2022 1:22 pm

No offense to Kite, but I think he is wrong. If he is reading this, maybe he can join the discussion :) The display isn't clever and it is configured for RGB888 according to the datasheet.

I am also using RGB666 and connected the least significant bits R0, R1, G0, G1, B0 and B1 to GND. And it is working fine.

There are seven pin mappings for DPI:
DPI Pins.png
DPI Pins.png (85.87 KiB) Viewed 13799 times
That's the parameter output_format you select in the DPI config generator. The Circuit Sword seems to use #5. Therefore you need dtoverlay=dpi18 in you config.txt to load the devicetree overlay for this pin mapping.

On my board I am using DPI mapping #6 because I need GPIOs 18 and 19 for audio output. Therefore I have compiled my own devicetree overlay for this pin mapping. That's dpi18_6.dtbo ;) I've attached it for reference but you don't need it.

You will need to use pin mapping #5 because you can't (easily) change the PCB layout of the Circuit Sword. Therefore this should work:

Code: Select all

dtoverlay=dpi18
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=516117
dpi_timings=640 1 44 2 42 480 1 16 2 14 0 0 0 60 0 32000000 1
If those settings still don't work, your display may be damaged or the flex cable is not properly inserted. Check for dust on the contact pins before you insert it.
Attachments
dpi18_6.zip
(990 Bytes) Downloaded 340 times

User avatar
kite
Posts: 972
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 246 times
Been thanked: 361 times
Contact:

Re: JT035IPS02 640x480 display config

Post by kite » Mon Jan 03, 2022 12:50 pm

floppes wrote:
Sun Jan 02, 2022 1:22 pm
No offense to Kite, but I think he is wrong. If he is reading this, maybe he can join the discussion :) The display isn't clever and it is configured for RGB888 according to the datasheet.
...
The LCD that OP was using, had a built in MCU that was hard coded to RGB666, there are quite a few models of this LCD and no doubt many with different configs baked into thier own MCUs, so the debugging above is true of OPs LCD but not of all :) Hope that helps!
Stock clearance - CLOSED: viewtopic.php?f=38&t=12064
Kite's Mailing List: https://goo.gl/forms/e97uUvPOfUxPWdz82
Kite's FAQ: https://kiteretro.com/faq/


ImageImageImageImageImage

ZJO
Posts: 13
Joined: Sat May 23, 2020 6:31 am
Has thanked: 2 times
Been thanked: 2 times

Re: JT035IPS02 640x480 display config

Post by ZJO » Tue Jan 04, 2022 3:55 pm

Thanks Kite.

I can confirm – I received another screen from the same seller (which I had ordered previous to this debacle) and it's a completely different display sold under the same model name :D

Good news is it doesn't appear to have a MCU chip, bad news no timings I've tried are giving me a picture, yet – the search continues.

floppes
Posts: 55
Joined: Thu Apr 19, 2018 5:58 am
Has thanked: 2 times
Been thanked: 33 times

Re: JT035IPS02 640x480 display config

Post by floppes » Thu Jan 06, 2022 7:42 am

Ok, then we got different displays. I ordered here and got two identical displays:
SpoilerShow
back.jpg
back.jpg (1.07 MiB) Viewed 13749 times
front.jpg
front.jpg (1.09 MiB) Viewed 13749 times
How do your displays look like?

I wrote a small image manipulator to simulate RGB666. It turns out that when the colors are shifted left by two bits (D0 becomes D2, D1 -> D3 etc. and D6 + D7 are cut off), I get the same distortions you see:
SpoilerShow
Original:
1.png
1.png (9.58 KiB) Viewed 13749 times
Colors shifted left by two bits:
1_.png
1_.png (9.06 KiB) Viewed 13749 times
SpoilerShow
Original:
2.png
2.png (3.95 KiB) Viewed 13749 times
Colors shifted left by two bits:
2_.png
2_.png (1.2 KiB) Viewed 13749 times
I am wondering how this shift is happening. Either your display has the signals on the cable configured differently, or it is applying the shift in its controller.

ZJO
Posts: 13
Joined: Sat May 23, 2020 6:31 am
Has thanked: 2 times
Been thanked: 2 times

Re: JT035IPS02 640x480 display config

Post by ZJO » Fri Jan 07, 2022 7:19 am

The first screen I recieved which has the weird colour shifting:
IMG20220107131830.jpg
IMG20220107131830.jpg (1.84 MiB) Viewed 13733 times
And the second screen I received from the same seller, same listing. The seller assures me it's the same, but it isn't! I can't find any timings for this one that give me a display. I've not spent much time looking, yet.
IMG20220107131748.jpg
IMG20220107131748.jpg (1.9 MiB) Viewed 13733 times

floppes
Posts: 55
Joined: Thu Apr 19, 2018 5:58 am
Has thanked: 2 times
Been thanked: 33 times

Re: JT035IPS02 640x480 display config

Post by floppes » Fri Jan 07, 2022 10:40 am

The first screen looks identical to mine, but I guess it has a different firmware. That's one of the imponderables we get with AliExpress :lol:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest