Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:29 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : RP2350 HDMI with 720P goodness

     Page 3 of 4    
Author Message
Exile
Newbie

Joined: 27/05/2023
Location: United Kingdom
Posts: 6
Posted: 11:07am 08 Sep 2024
Copy link to clipboard 
Print this post

  Quote  I'll have a play and see if it works - thanks for the info


I've successfully run the CVT-RB (320MHz) and CVT-RBv2 (300MHz) timings on my Pico2 in an Olimex board running the SDK dvi_out_hstx_encoder example and got a valid display on the monitors and TVs that I tried. On my Pico2 300Mhz works at 1.1V, 320MHz requires 1.2V.

I guess the question is whether there is enough CPU time on the second core to process the overlays etc for 720p at the lower clock rate?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9105
Posted: 11:20am 08 Sep 2024
Copy link to clipboard 
Print this post

Did you use the vsync/hsync directions in the posted list? I tried the 320 and got nothing and the non-RB version disagrees with the spec I found https://projectf.io/posts/video-timings-vga-720p-1080p/
 
Exile
Newbie

Joined: 27/05/2023
Location: United Kingdom
Posts: 6
Posted: 07:48pm 08 Sep 2024
Copy link to clipboard 
Print this post

I think the values in the link you provided correspond to the CEA-861 line in the link I provided. The polarity is the same for these.

I've attached a zip of the updated dvi_out_hstx_encoder.c file from the Pico SDK that I used with the Olimex board. The defines in lines 42 to 45 determine which video mode is built. All of the modes display on on my monitors, but that is not a very large sample size  

The 640x480 mode in the original SDK file corresponds to the 640x480 mode in the link I gave for CEA-861. The polarity matches (both negative)
dvi_out_hstx_encoder.zip
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 05:44pm 11 Sep 2024
Copy link to clipboard 
Print this post

Please note:  I am not reporting this as a "bug" or "flaw" or something to be fixed.  Just thought I'd report on some testing in case it's helpful or may save someone some agrivation.

I am having mixed results with the widescreen modes (720P)  I have tested on 5 HDMI TV's so far.  I have one 24" Vizio branded TV that will properly display a nice edge-to-edge picture in 720P mode.  However, the TV seems to lose sync every few minutes and go blank.  Almost immediately, it will regain the signal and briefly display the OSD indicating a 720P signal, and then resume displaying properly.  I thought perhaps I had a connection problem somewhere, but the exact same setup works perfectly at 640X480

The other 5 TV's I have tested (from 13"-55") won't display the widescreen (720P) image properly.  4 of them won't display anything, as though no signal was connected, and the other will display an image with lots of banding and "snow" similar to the image @homa posted near the beginning of this thread.

All of the tested TV's work great with HDMI at 640X480 with a nice stable image provided that +5V is connected to the Adafruit HDMI breakout board.

I tested with a DELL branded computer monitor using a passive HDMI to DVI cable.   The monitor will only sync to the signal occasionally and even then there is a narrow blue stripe down the left hand side, the image is offset, and the image quality is poor.  Also the auto-size feature of the monitor does not seem to detect a valid signal when the auto-detect button is pressed.  This monitor and cable also work perfectly at 640X480

It would seem that the 720P mode being used is not fully supported or "standard" for HDMI TV's (at least here in the US???)  Your Mileage May Vary.

As always I am willing to re-test if there are potential tweaks to the signal timing etc.

PicoMiteHDMI MMBasic Version 6.00.00b6
OPTION FLASH SIZE 16777216
OPTION KEYBOARD US
OPTION PICO OFF
OPTION CPUSPEED (KHz) 372000
OPTION DISPLAY 45, 80
OPTION WIDESCREEN ENABLE
OPTION SDCARD GP5, GP2, GP3, GP4
OPTION PLATFORM HDMIbasic
OPTION DEFAULT FONT 3, 1
Edited 2024-09-12 03:48 by Sasquatch
-Carl
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 07:16pm 11 Sep 2024
Copy link to clipboard 
Print this post

I have found exactly the same, so you are not alone. :-) To be honest I'm not at all bothered with 720p, because of it's different aspect ratio to all the existing modes, it's only minor advantage is to getting the overall clock speed higher.
post in 2350 firmware
Edited 2024-09-12 05:22 by Bleep
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 07:28pm 11 Sep 2024
Copy link to clipboard 
Print this post

> option list
PicoMiteHDMI MMBasic Version 6.00.00b6
OPTION AUTORUN  ON
OPTION FLASH SIZE 4194304
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 315000
OPTION DISPLAY 30, 53
OPTION HDMI PINS  1, 3, 7, 5
OPTION SDCARD GP22, GP6, GP7, GP4
OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5
OPTION MODBUFF ENABLE  192
OPTION PLATFORM OLIMEX
>
this is my olimex and pico2 hdmi works hdmi to old luxor tv
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:09pm 11 Sep 2024
Copy link to clipboard 
Print this post

RUN
[105] Play modfile "b:\sfx-bg.mod" '"RISsound.mod"
Error : Not enough memory
>
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9105
Posted: 08:25pm 11 Sep 2024
Copy link to clipboard 
Print this post

You are in mode 3 so a framebuffer takes 640x480x4-bits = 153K. Playing a mod file requires buffers for playback so you ran out of memory - this is just a simple limitation of what memory is available
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:52pm 11 Sep 2024
Copy link to clipboard 
Print this post

  matherp said  You are in mode 3 so a framebuffer takes 640x480x4-bits = 153K. Playing a mod file requires buffers for playback so you ran out of memory - this is just a simple limitation of what memory is available

thanks sir. I'm dim. I thought you was doin magic with memory .a nostalgia chip?
na serious all amazing . can be a ott sometimes but not moanin. the olimex is cool."for a pcb" . but how long before something else?
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 09:06pm 11 Sep 2024
Copy link to clipboard 
Print this post

' Bubble Universe
mode 3
option autorun on
Dim Float u,a,p,q,t,v=0, x=0
Dim Integer g,b,i,j,c(41),d(41),e(41),n(41)
Dim Integer f(41,41),l(41,41),m(41,41)
Const w=MM.HRes/2, h=MM.VRes/2
Const r=(2*Pi)/235, o=h/2
FRAMEBUFFER CREATE F
FRAMEBUFFER WRITE f

CLS RGB(black)':Backlight 95
t=Rnd*10:math set 2,e()'Math set 3,e()

For g=0 to 41
for b=0 to 41
  m(g,b)=rgb(g*6,b*6,128*(g+b>30)*(g+b<60))
Next:Next

Do
Inc t,0.025:g=0:Timer =0
For i=50 To 255 Step 5
b=0
a=r*i
Math Slice f(),g,,c()
Math Slice l(),g,,d()
Box c(),d(),e(),e(),0,,0
For j=50 To 255 Step 5
p=i+v:q=a+x
u=Sin(p)+Sin(q):v=Cos(p)+Cos(q)
x=u+t:c(b)=w+u*o:d(b)=h+v*o
Inc b
Next
Math Slice m(),g,,n()
'Box c(),d(),e(),e(),0,,n()
pixel c(),d(),n()
Math Insert f(),g,,c()
Math Insert l(),g,,d()
Inc g
Next i

FRAMEBUFFER COPY f,N
'Print Timer
Loop

RUN
[12] FRAMEBUFFER CREATE F
Error : Not enough memory
>
more pico2 stuff that worked 2040. stan?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6779
Posted: 07:03am 12 Sep 2024
Copy link to clipboard 
Print this post

Don't create a framebuffer in Mode 3 seems to be the answer. At least, not unless your program takes little RAM, so no big arrays.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 07:56am 12 Sep 2024
Copy link to clipboard 
Print this post

  Quote  , so no big arrays.

Dim Integer f(41,41),l(41,41),m(41,41)

= 41 x 41 x 8 x 3 Bytes
= 40,344 Bytes
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 09:54am 12 Sep 2024
Copy link to clipboard 
Print this post

Here is the version of Bubble that will work on the 2350.
It is calculating and updating 2700 points at around 4Hz.
I haven't attempted any optimisation for the 2350; yet.
bubble2350.bas.zip
Edited 2024-09-12 20:42 by Bleep
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 04:29pm 12 Sep 2024
Copy link to clipboard 
Print this post

Ok, More info on the 720P widescreen modes.  I did some reading on the HDMI specification.  Seems that full spec signal is 3.3V into 50ohms which would require a drive current of some 66mA.  Not really compatible with microcontroller output pins, hence the 220ohm current limiting resistors we are using.  Also read somewhere about signal rise times in the order of 100ps. Yikes!

So given that we likely have sub spec drive levels and the high speed signal requirements, I removed the Adafruit HDMI breakout board from the solderless breadboard and twisted each pair (+/- for each signal pair) of Dupont leads connecting them directly to the HDMI breakout.  The Pico2 end is still on the solderless breadboard connected by Dupont leads.

Happy News!  All the TV's and Monitors I have tested have a nice stable sync at 720P and a perfect widescreen picture.  

DOH!  Seems my setup was at the Bleeding Edge of working and the 720P modes pushed it over the "edges".  I don't know why I didn't realize this sooner?  I was aware that the solderless breadboard added a lot of capacitance.  I guess I was fooled by the setup working so well at 640X480.

Anyhow, for those struggling to get their HDMI displays working with the Widescreen 720P modes, try to clean up your wiring setup keeping in mind we are dealing with higher speed signals than we usually encounter.  Better grounding might also help in this situation.

Please let us know what you find out!

My Olimex boards should arrive today, which will eliminate the wire nest I am currently using.
-Carl
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 07:59pm 12 Sep 2024
Copy link to clipboard 
Print this post

I just had another thought!  I know, I know, it scares me too!

If we used a differential driver IC (with complementary 3.3V outputs) could the HDMI interface be reduced to 4 I/O pins?  One I/O pin for each HDMI channel (CLK, D0, D1, D2) and the driver IC would generate the differential signals for each channel.

Not sure if the HSTX peripheral could be configured this way.  Need to find some data sheets and do some digging when I get some time.
-Carl
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 03:36am 13 Sep 2024
Copy link to clipboard 
Print this post

@Sasquatch

This would be cool

I use a lot of the MC3486 receivers but they are 5V.
Edited 2024-09-13 13:39 by PhenixRising
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4222
Posted: 06:37am 13 Sep 2024
Copy link to clipboard 
Print this post

  PhenixRising said  @Sasquatch

This would be cool

I use a lot of the MC3486 receivers but they are 5V.


Hi Phenix,

No chance....
- 3486 are receivers, but even when they would be transmitters, they are far to slow.
 They have 30ns propagation delay. DVI is running 30MHz clock (that is 33ns). So the driver has almost 1 full clock cycle delay (*).

Volhout

(*) it is not the delay that is killing, but the difference in delay between channels. With a 30ns per driver delay, delay difference between channels (or different chips) will kill DVI.
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9105
Posted: 06:41am 13 Sep 2024
Copy link to clipboard 
Print this post

Don't know what part could/would meet the spec but, for example, the MC3486 is at least an order of magnitude too slow. For 720P the clock is running at 186MHz so you need rise times of maximum a couple of nano seconds
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6097
Posted: 07:14am 13 Sep 2024
Copy link to clipboard 
Print this post

Perhaps someone would like to try a HDMI Booster or splitter.
Prices vary and as usual the specs are many and varied but they 'should' do the job.

Jim
Edited 2024-09-13 17:17 by TassyJim
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6779
Posted: 07:48am 13 Sep 2024
Copy link to clipboard 
Print this post

You might get away with 8 emitter followers if you can find some fast enough devices. That would give a lower impedance output, a better match into 50R. MOSFETs might have too much gate capacitance to work from the Pico outputs so fast BJTs might be better. 200MHz is still within the realms of possibility for VHF transistors.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 3 of 4    
Print this page
© JAQ Software 2024