Author Topic: Image Alignment - 480x272 image on 800x480 TFT  (Read 1508 times)

mike_s

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Image Alignment - 480x272 image on 800x480 TFT
« on: January 12, 2019, 06:09:24 PM »
Hi Everyone,

I'm just getting through some initial debugging on my board using an STM32H7, connected to the :  NHD-5.0-800480TF-ATXL-CTP
(800x480 TFT)

I'm using the STM32H7 built-in LTDC display controller... STM has sample code/etc for testing out the LCD screen, etc..

so their eval setup used a 480x272 LCD display, whereas I'm using this one above, 800x480..

so after setting up the params correctly, I can display their test image, but I would have expected for the image to have started at the left-side origin, but there is some blank space...

What I'm wondering is if this could happen from an I/O being wrong or shorted?  or would I see scrambled data if that was the case?

Ted_M

  • Administrator
  • Full Member
  • *****
  • Posts: 132
  • Karma: 5
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #1 on: January 16, 2019, 11:36:23 AM »
Hi Mike,

I have sent you an email with a recommendation to compare the RGB timings in the example code you're using with the RGB timing values in our 5" TFT's datasheet as a starting point.
Let us know if this resolves the issue.

Best Regards,

bricharditede

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
    • Hi.
Image Alignment 480x272 image on 800x480 TFT
« Reply #2 on: May 07, 2019, 04:26:01 PM »
i like this, but i would like that image would be a thumbnail that enlarge with a click, and all thumbnail with the same width and large. Is this possible?

mike_s

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #3 on: May 17, 2019, 08:09:19 AM »
Hi All,

Just wanted to update, that this issue can now be CLOSED as SOLVED.

The offset shown in that image was because the datasheet in 2018 for this TFT had the  HBP (Horizontal Back Porch) value as 88 pixel clocks, which through trial and error testing I found out was waaayyy too high.  I turned out the HBP needed to be in the 40s area.

Looks like the datasheet has been updated recently, and it's showing correct values now for HBP as well as better timings for the other values.


So this TFT is indeed working awesome now, no issues whatsoever!

Thanks so much,


- Mike

v8dave

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 2
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #4 on: May 17, 2019, 10:06:51 PM »
The offset shown in that image was because the datasheet in 2018 for this TFT had the  HBP (Horizontal Back Porch) value as 88 pixel clocks, which through trial and error testing I found out was waaayyy too high.  I turned out the HBP needed to be in the 40s area.

This is interesting to know. I have a 7.0" with 800x480 and in the timing, it has HBP also as 88 clocks. I got some timing from Newhaven tech that sets the HBP to 40. I have tried this and the display is much better but I still get tearing and some artifacts on the display. Can I ask what other timing values you used for your 5.0" display? I think the 5 and 7 are the same except for the clock which is latched on the positive edges on the 5.0"

Cheers
Dave...

mike_s

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #5 on: May 20, 2019, 09:25:57 AM »
The offset shown in that image was because the datasheet in 2018 for this TFT had the  HBP (Horizontal Back Porch) value as 88 pixel clocks, which through trial and error testing I found out was waaayyy too high.  I turned out the HBP needed to be in the 40s area.

This is interesting to know. I have a 7.0" with 800x480 and in the timing, it has HBP also as 88 clocks. I got some timing from Newhaven tech that sets the HBP to 40. I have tried this and the display is much better but I still get tearing and some artifacts on the display. Can I ask what other timing values you used for your 5.0" display? I think the 5 and 7 are the same except for the clock which is latched on the positive edges on the 5.0"

Cheers
Dave...

Hi Dave,

I don't have my code in front of me at the moment, but I remember checking the other day against the latest datasheet, and my timing numbers now match exactly what is in the sheet, so I didn't have to tweak anything else...

Although, I DO encounter similar problems if I push the pixel clock closer to their recommended values of 30-50Mhz...  now it could very well be my board layout, since I didn't do any meandering for the bus lines...I do have series termination, as I originally saw a good bit of reflection on the scope... they are much cleaner now..

So, I am currently running my pixel clock at 24Mhz, which is 100% clean with no tearing or artifacts... if I push it to 30Mhz and up, things start to go bad...


v8dave

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 2
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #6 on: May 20, 2019, 09:04:42 PM »
Thanks Mike

I suspect I have reflection issues as I didn't install any series termination resistors in the lines. I am considering restringing the PCB to add these to the PCB layout but on the prototype, I will try to install these in the clock and the sync as a minimum. I never had to do this with the previous 7" LCD but it does look like I need to do this on this one.

PS. I read up on it and there is no need for meandering on the LCD lines as the clocks are not that fast to need this. A good layout is needed though and in my case, I kept the clock clear of the other lines as I saw issues with this before.

v8dave

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 2
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #7 on: May 22, 2019, 05:39:33 AM »
I was able to add 22R resistors to the CLK, HSYNC, VSYNC and DEN and reduced the drive current on the RGB lines and now I seem to have a more stable display although I do see some horizontal shift when I use anything but black on the left side of the LCD, but it is looking closer now to being a working LCD.

mike_s

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #8 on: May 22, 2019, 09:25:31 AM »
I was able to add 22R resistors to the CLK, HSYNC, VSYNC and DEN and reduced the drive current on the RGB lines and now I seem to have a more stable display although I do see some horizontal shift when I use anything but black on the left side of the LCD, but it is looking closer now to being a working LCD.

Hi Dave,

that's good, I was going to suggest (if by chance you are using an STM32 or similar where you can change the I/O drive strength), to set the I/O 'strength', or in STM32 case, the 'speed', as this made a BIG difference in the I/O signals and reflections...

I think I have mine set at 'HIGH', which seemed the best (ie VERY HIGH is more in the ballpark of 100mhz or more like SDRAM, etc)

Also, play with your pixel clock and see if slowing it down a bit cleans up your picture too... as I was saying, I am good at 24Mhz, if I go to 30Mhz or higher, I get distortion, even with all the I/O cleanup I have, it's still not good.. so for now 24mhz is fine for my setup..


but I could probably figure it out if I scope'd it up again and did more resistance tweaking, but for now I'm ok with where it's at, I have 68R series resistors on my lines, I did all lines with my last board spin..

- Mike

v8dave

  • Jr. Member
  • **
  • Posts: 20
  • Karma: 2
    • View Profile
Re: Image Alignment - 480x272 image on 800x480 TFT
« Reply #9 on: May 24, 2019, 02:17:07 AM »
Thanks, Mike,

I am running with a Samsung S5P6818 8 core A53 processor board from FriendlyArm (NanoPC T3 Plus)

I'll try lowering the pixel clock too. Right now it is at 30Mhz. I have the drive level set at 2 for all timing and 1 for the RGB. Values are 0 to 3 for the driver current. I could try 3 and see what it looks like.

My other post shows what I am seeing now and apart from this, the display looks good otherwise.

 

NHD-7.0-800480EF-20 Controller Board and the backlight on a 800x480 LCD Display

Started by dfanslerBoard TFTs

Replies: 1
Views: 6558
Last post July 27, 2015, 10:08:23 AM
by Saurabh_B
Controller for 800x480 TFT Display

Started by dfanslerBoard TFTs

Replies: 1
Views: 4808
Last post January 19, 2015, 02:34:41 PM
by Michael_L
Can't display a sample BMP image properly on NHD-2.4-240320CF-CTXI#-F with NHDev

Started by HidefumiMBoard Evaluation Tools

Replies: 3
Views: 1989
Last post December 28, 2018, 05:12:36 PM
by Alee_S
MOVED: NHD-0420CW-AY3 display, text is mirror image

Started by Saurabh_BBoard Character LCDs

Replies: 0
Views: 5202
Last post March 11, 2016, 07:51:03 AM
by Saurabh_B
y-axis of image is offset : SSD1963 for NHD-5.0-800480TF-ATXL#-CTP -

Started by davidbBoard TFTs

Replies: 2
Views: 4019
Last post September 01, 2016, 02:09:43 AM
by davidb