ElectroGloop
Posts: 4
Joined: Fri Jan 13, 2017 9:40 am

HDMI timings on 3.5" display

Fri Jan 13, 2017 10:38 am

Hello, I'm trying to get a display working for a project I am working on but am having difficulty with the hdmi_timings.
Hopefully someone can help.
I am using the Adafruit TFP401 HDMI decoder board with a 40 pin TTL RGB LCD (3.5") I found.
Resolution is quite low at 320x240 so I am wondering if it's truly possible to drive a display properly with this low resolution over HDMI.
I have the datasheet for the LCD and have used this to enter the following settings into the boot\config.txt

Code: Select all

hdmi_cvt=320 240 75 1 0 0 1
hdmi_group=2
hdmi_mode=87
hdmi_timings=320 0 20 10 68 240 0 4 2 18 0 0 0 75 0 5760000 1
I managed to get the display working and readable but it's not 100% right.
The display is shifted slightly to the right cutting off part of the display.

I don't really know what the hsync pulse and vsync pulse parameters should be so I have been doing some trial and error.
Is there another way I can find out the correct values?

Here is a link to the datasheet for the lcd:
http://www.orientdisplay.com/pdf/AFY320 ... N12NTM.pdf

Image
Last edited by ElectroGloop on Fri Jan 13, 2017 8:43 pm, edited 1 time in total.

aBUGSworstnightmare
Posts: 563
Joined: Tue Jun 30, 2015 1:35 pm

Re: HDMI timings on 3.5" display

Fri Jan 13, 2017 1:22 pm

get rid of the hdmi_cvt line and make sure your'e using a real custom HDMI timing (refer to viewtopic.php?f=29&t=24679 for all the details).

And, why don't you use the timing from the data sheet page 10? Everything is present in the table and you only need to copy the values to your hdmi_timings line.
hdmi_timings=<h_active_pixels> <h_sync_polarity> <h_front_porch> <h_sync_pulse> <h_back_porch> <v_active_lines> <v_sync_polarity> <v_front_porch> <v_sync_pulse> <v_back_porch> <v_sync_offset_a> <v_sync_offset_b> <pixel_rep> <frame_rate> <interlaced> <pixel_freq> <aspect_ratio>

<h_active_pixels> = horizontal pixels (width)
<h_sync_polarity> = invert hsync polarity
<h_front_porch> = horizontal forward padding from DE acitve edge
<h_sync_pulse> = hsync pulse width in pixel clocks
<h_back_porch> = vertical back padding from DE active edge
<v_active_lines> = vertical pixels height (lines)
<v_sync_polarity> = invert vsync polarity
<v_front_porch> = vertical forward padding from DE active edge
<v_sync_pulse> = vsync pulse width in pixel clocks
<v_back_porch> = vertical back padding from DE active edge
<v_sync_offset_a> = leave at zero
<v_sync_offset_b> = leave at zero
<pixel_rep> = leave at zero
<frame_rate> = screen refresh rate in Hz
<interlaced> = leave at zero
<pixel_freq> = clock frequency (width*height*framerate)
<aspect_ratio> = *

* The aspect ratio can be set to one of 8 values (choose closest for your screen):

HDMI_ASPECT_4_3 = 1
HDMI_ASPECT_14_9 = 2
HDMI_ASPECT_16_9 = 3
HDMI_ASPECT_5_4 = 4
HDMI_ASPECT_16_10 = 5
HDMI_ASPECT_15_9 = 6
HDMI_ASPECT_21_9 = 7
HDMI_ASPECT_64_27 = 8
i.e. v_front_porch = tVFP = 4, etc.

ElectroGloop
Posts: 4
Joined: Fri Jan 13, 2017 9:40 am

Re: HDMI timings on 3.5" display

Fri Jan 13, 2017 1:41 pm

Thanks, but still a bit confused.
I can remove the hdmi_cvt line, but keep the hdmi_group and and hdmi_mode?

I have also used all the values from the datasheet in my hdmi_timings line, with the exception of h_sync_pulse and v_sync_pulse as I can't see those particular values in the sheet, unless I am mistaken?

Sorry, I am fairly new to the hdmi settings in config.txt

bravech
Posts: 2
Joined: Mon Jun 17, 2013 6:53 pm

Re: HDMI timings on 3.5" display

Mon Mar 20, 2017 8:13 pm

Sorry about necro'ing, I'm unable to private message (just joined). Were you ever able to get the correct settings for that display? I have the same one and want to set it up similar to how you have it.

ElectroGloop
Posts: 4
Joined: Fri Jan 13, 2017 9:40 am

Re: HDMI timings on 3.5" display

Tue Mar 21, 2017 1:22 pm

I didn't get it working quite right unfortunately :(
I ended up using a composite 3.5" display

Return to “Other projects”

Who is online

Users browsing this forum: No registered users and 14 guests