True HDMI for Tang Nano 9K - Page 1
Forum section: electronics / general

author: hve
author_rank: Regular Contributor
timestamp: October 20, 2022, 08:10:02 pm
content: Hi All,So my initial question:QuoteUPDATE - 2023-1-1Nope, turns out we need to populate R1, in order to provide +5v and activate the pullups for DDC and CEC. Thanks Andryblack:Quote from: andryblack on December 16, 2022, 10:52:56 pmTurns out that it was indeed electrical incompatibility:Quote from: BrianHG on October 21, 2022, 01:33:23 pmSo in this post I created an initial schematic that is intended to be plugged in to the Tang Nano Boards and should deliver True - open drain - compatible HDMI output for use in general TV sets and so on.See post belowhttps://www.eevblog.com/forum/fpga/fpga-to-hdmi-variants/msg4482196/#msg4482196design files attached for thos willing to exploit the idea...Updated:V1.1 Schematics and the PCB file are included in the zip file.Just upload inhttps://easyeda.com/

author: BrianHG
author_rank: Super Contributor
timestamp: October 20, 2022, 11:34:55 pm
content: Use the 99cent LVTTL/LVDS->TMDS HDMI translator cable driver IC in the circuit posted here:https://www.eevblog.com/forum/fpga/hdmi-dvi-encoder-with-audio-smart-quartus-pll-integration-in-systemverilog/All other coding is up to you. Note that some monitor inputs will only accept DVI mode and they will ignore a HDMI signal. Make sure you can switch between the 2.My LG flatron monitor is an example. The HDMI input works with both DVI and HDMI TX standards, but, it also has a DVI input which will only understand DVI mode exclusively.

author: laugensalm
author_rank: Regular Contributor
timestamp: October 21, 2022, 08:59:33 am
content: What's your resolution?This could have many reasons, but you'll definitely get a compatibility gain when supporting EDID and proper video mode configuration, although classical video modes should work everywhere. I've come across a monitor (a no-name unit) that required an EDID readout sequence in order to start syncing.HDCP is not an issue here. With high pixel clocks though, timing issues or IP core deficiencies can be exposed and some monitors may refuse to display, some would glitch, etc. These cases are hard to determine without a sink being able to debug lane skews and other HDMI issues, let aside really expensive GHz scopes able to spot signal issues.

author: hve
author_rank: Regular Contributor
timestamp: October 21, 2022, 09:56:55 am
content: Hi Brian,I am using this board:https://wiki.sipeed.com/hardware/en/tang/Tang-Nano-9K/Nano-9K.html.HDMI driver schematic is below:The CEC and DDC/I2C port are unused now, only pull-up to 5VI am suspecting that consumer electronic TV sets require the EDID / HDCP handshake via DDC or will fail to service the signal..

author: mon2
author_rank: Frequent Contributor
timestamp: October 21, 2022, 10:04:07 am
content: Found this:https://github.com/tmatsuya/i2c_edid

author: hve
author_rank: Regular Contributor
timestamp: October 21, 2022, 10:24:09 am
content: Hi Laugensalm,I am aiming for 1280x720x60 which should be quite standard.Connecting the laptop to the TV I can readout the supported modes:Code:// Modeline "Mode 4" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync// pclk hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotalUsing the Sameer hdmi code repohttps://github.com/hdl-util/hdmi/:Slightly changed the mode parameters in 'hdmi.sv':Code:4:beginassign screen_width = 1280;assign hsync_pulse_start = 110;assign hsync_pulse_size = 30; // 40;assign frame_width = 1650;assign screen_height = 720;assign vsync_pulse_start = 5;assign vsync_pulse_size = 5;assign frame_height = 750;assign invert = 0;endYes will need to perform EDID readout I think...

author: BrianHG
author_rank: Super Contributor
timestamp: October 21, 2022, 10:31:02 am
content: Quote from: hve on October 21, 2022, 09:56:55 amThat is only true if you HDCP encrypt your video. I dont believe you are doing that as it requires an extensive license agreement. I have not bothered with EDID yet and have not had any problems getting a picture to work fine.Additionally, I'm sorry, but the board schematic you are showing does not have an authentic TMDS cable driver. It is a 'Jerry rigged' together solution which cannot be guaranteed to drive a HDMI or DVI compliant signal down any length of cable.If you want a proper TMDS, transition-minimized differential signaling cable driving specification for HDMI & DVI, then the easiest solution when wiring to a FPGA's LVDS differential output pairs is to use this NXP IC:https://www.nxp.com/docs/en/data-sheet/PTN3366.pdfUnless your FPGA has a specific IO mode designed to drive a pulled-up 3.3v DC terminated end-point at the other end of the cable, use the NXP IC listed above which does support this HDMI/DVI weird standard driver for you. Trying to pull off what you have shown in your supplied schematic, like the DC filter caps with the diode clamping will offer spotty support at best with many monitors.

author: hve
author_rank: Regular Contributor
timestamp: October 21, 2022, 01:16:59 pm
content: Quote from: BrianHG on October 21, 2022, 10:31:02 amHmm I was hoping for an other answer, as some sort of an EDID handshake would be relatively easy to implement.I will hook up the scope this weekend in order to see what signal is actually on the pins.Thank you Brian!

author: hve
author_rank: Regular Contributor
timestamp: October 21, 2022, 01:26:52 pm
content: Quote from: mon2 on October 21, 2022, 10:04:07 amIt is for the display end. Still maybe see to start of with proper matching...

author: BrianHG
author_rank: Super Contributor
timestamp: October 21, 2022, 01:33:23 pm
content: Quote on page 3, paragraph 1 of PTN3366 data sheet:QuoteYour gowin FPGA IOs cannot do that, and the series caps driving the outputs only makes things worse.See the functional diagram on page 5, figure 2 of PTN3366 data sheet.The gowin can only properly drive the series cap AC coupled DisplayPort digital video standard and some monitor inputs which may be wired to an HDMI connector may also be DisplayPort compatible for those input lines. This may be the only reason some HDMI/DVI monitors can function with your circuit.

author: hve
author_rank: Regular Contributor
timestamp: October 23, 2022, 07:20:36 pm
content: Quote from: BrianHG on October 21, 2022, 01:33:23 pmTotally right, I should have done my homework.Lesson here is just because device has HDMI connector does not mean HDMI compatible.. Thanks Brian case solved.

author: NiHaoMike
author_rank: Super Contributor
timestamp: October 23, 2022, 10:17:50 pm
content: Get one of those cheap HDMI repeaters to regen the signal.

author: hve
author_rank: Regular Contributor
timestamp: October 24, 2022, 08:08:21 pm
content: Added a schematic of HDMI converter module for the Tang Board as suggested by Brian:Comments are welcome...Schematic:3D view:The JSON files for use withhttps://easyeda.com/are included in the zip feel free to experiment...Comments are welcome..

author: BrianHG
author_rank: Super Contributor
timestamp: October 24, 2022, 08:21:55 pm
content: Quote from: hve on October 24, 2022, 08:08:21 pmYou also need to pass the 5v to the HDMI out connector.Some PC monitors use this to sense if the PC is powered on, IE should they go into deep sleep. Others use it to auto-scan their multiple video inputs.The HPD tells the PC/video out side if it should turn on the TMDS transmitter, otherwise it may not pass FCC as an open plug may be transmitting a 1.5GHz plus sub-band signals into open air.I'm not sure who designed that Tang Nano 9K PCB, but, replacing the 2x diode protection ICs with the one NXP buffer would have cost less in the long run, offer true HDMI cable driving with it's own built in anti-static diode protection and offer true DDC I2C level shifting.

author: BrianHG
author_rank: Super Contributor
timestamp: October 24, 2022, 08:31:03 pm
content: Quote from: NiHaoMike on October 23, 2022, 10:17:50 pmI guess he decided to build one.

author: tchicago
author_rank: Regular Contributor
timestamp: October 24, 2022, 08:55:16 pm
content: Is there any more generic PTN3366 -> HDMI breakout board that can be used with other FPGAs boards? (Maybe supporting lower resolutions if there are signal integrity constraints with lower frequency connectors)I saw there was one from nockieboy in this topichttps://www.eevblog.com/forum/fpga/hdmi-dvi-encoder-with-audio-smart-quartus-pll-integration-in-systemverilog/but it has no PCB file to get gerbers from.

author: BrianHG
author_rank: Super Contributor
timestamp: October 24, 2022, 09:13:01 pm
content: Quote from: tchicago on October 24, 2022, 08:55:16 pmThe PTN3366 works from 240p to 1080p.Plenty of stock exists everywhere, EG:https://www.mouser.com/ProductDetail/NXP-Semiconductors/PTN3366BSMP?qs=%252BRKXB2WKlSdBGKoajmQSNw%3D%3Dhttps://www.digikey.com/en/products/detail/nxp-usa-inc/PTN3366BSMP/5981060?s=N4IgTCBcDaIAoBUByBmFA2dIC6BfIAIt's easy to wire, left side in, right side out, straight wires...And with Nockieboy's and my code, even with crummy board-board din connector and unbalanced wiring, we got a Cyclone IV with it's normal LVTTL outputs to go as far as 1440x960, or 1280x1024. (This is way beyond Altera's advertised limits for their normal IO toggle rate.)Note that the PTN3366 does have internal pull-up resistors on the input side. It may have been possible to directly wire it to the FPGA outputs without the DC filter caps, but, we did not experiment this far as the first solution worked right off the bat.

author: BrianHG
author_rank: Super Contributor
timestamp: October 24, 2022, 09:29:40 pm
content: Quote from: tchicago on October 24, 2022, 08:55:16 pmThis was the point where we finished the PCB:https://www.eevblog.com/forum/fpga/fpga-vga-controller-for-8-bit-computer/msg3328920/#msg3328920Just ask nockieboy for the gerbers, or source files. I guess he just thought that no one else would bother with that PCB designed for that FPGA dev board.6gb/s 4k support would require TI's TDP158. Note you are paying for the 6ghz HDMI 2.0b capable driver.

author: hve
author_rank: Regular Contributor
timestamp: October 24, 2022, 11:06:31 pm
content: Quote from: BrianHG on October 24, 2022, 08:31:03 pmI ordered one for 2.5 USD just in case ...Don't look forward replacing the displayport connector with a HDMI-Male connector.

author: hve
author_rank: Regular Contributor
timestamp: October 24, 2022, 11:14:01 pm
content: Quote from: BrianHG on October 24, 2022, 09:29:40 pm1280x720P is good enough for me the Nano 9K board stays well below 1.2 GHz...Updated the design files to v1.1 if you are curious see the first post for the sources.

author: andryblack
author_rank: Newbie
timestamp: December 16, 2022, 10:52:56 pm
content: Quote from: hve on October 20, 2022, 08:10:02 pmCheck R1 on Tang Nano 9k board, after soldering this jumper (near HDMI connector) my Samsung TV recognize signal and show image.

author: hve
author_rank: Regular Contributor
timestamp: January 01, 2023, 05:52:08 pm
content: Thanks allot. Super this works!Bridged the R1 with a wire. See attachment.

author: andryblack
author_rank: Newbie
timestamp: November 13, 2024, 08:15:39 pm
content: Anybody success with HDMI/dvi RX on tang nano 9?