Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:58 28 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 : Problem with VGA video output PicoVGA

     Page 2 of 3    
Author Message
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 01:51pm 28 May 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  Oddly enough, the mosfet resistance in a GP pin of the RP2040 is about 50R.

From a datasheet? (I don't need to know where, it's beyond me, just kinda yes or no please)

  Mixtel90 said  I suppose that makes quite a nice line termination resistor for the sync signals. :)

So don't need the 47R?

(I don't for my current use as it works on the only monitor I could hook up quickly.)

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 02:29pm 28 May 2023
Copy link to clipboard 
Print this post

The technical way:

You can measure it. put a load on a pin, say 200R. Switch the pin on and measure the output voltage - it's not 3V3 because there's a volt drop on the output. You know it *was* 3V3 before it got to the mosfet, so the volts lost must be lost in the internal resistance. You know the load resistance and the output voltage so you can get the current using Ohm's law. You know the voltage difference and the current so you can calculate the internal resistance.

On a relatively short lead it doesn't seem to make any difference to me whether the 47R resistors are in or not. It will probably depend on the length of the lead, whether the sync lines are screened (i.e. have more capacitance) and the monitor input. It doesn't affect me now because my current VGA lead is less than a foot long!
Mick

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

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 02:30pm 28 May 2023
Copy link to clipboard 
Print this post

Rp2040 putput pins are measured, by me, to be between 40 and 50 ohm.
Sync pins on VGA drive high impedence logic pins, these pins are not 50 ohm terminated in the monitor.

50 ohm termination makes sense when the cable is (coax) 50 ohm. But VGA cables typically only have coax for R G and B.
Maybe some high end cables have coax for HSYNC.
But if HSYNC is a coax cable it would be the same type of coax as used by R G and B.

R G and B are 75 ohm coax.

This means that, if, HSYNC is coax, then it is 75 ohm coax.

For the RP2040 that would translate into a 27 ohm or 33 ohm series resistor.

Does it matter? No a 1 meter VGA cable that has a mismatch would give a reflection after 6ns, which is less than half of a pixel. The VGA monitor has a sampling PLL that will compensate for that.

The only reason for this to fail is when the picomit crystal is off-tuned, the VGA is generated at a frequency, too low, or high, for the monitors PLL to lock.

This, and crystal clock jitter, might have been culprit for the first batch of CMM2's with the waveshare stm32 module.
Edited 2023-05-29 00:38 by Volhout
PicomiteVGA PETSCII ROBOTS
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 03:37pm 28 May 2023
Copy link to clipboard 
Print this post

@volhout
Oke, It's probably not needed for termination, but I see this resistor in the original schematics used by the raspberry foundation.... It is not related to my original problem (good/correct adjustment of the monitor solved it) but over driving sync is also not a good idea I thought.... while looking to other examples. The BBC basic guys use the solution of 4 bit per colour RGB and vsync Hsync via 47 Ohm resistor. In many VGA terminals build around a 3.3V processor (2040 or esp32) I see also a 47 Ohm resistor used for vsync and hsync. So what is correct? I don't know... without the resistor it works but with resistor possibly also. Probably if you use an old vacuum tube monitor it's better to have the 47 Ohm resistor.....
Greetings,
Nick de pe1goo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 04:03pm 28 May 2023
Copy link to clipboard 
Print this post

Thanks, guys!

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 05:22pm 28 May 2023
Copy link to clipboard 
Print this post

  JohnS said  Thanks, guys!

John


You're welcome...

Volhout
PicomiteVGA PETSCII ROBOTS
 
Hawk

Senior Member

Joined: 15/07/2021
Location: Australia
Posts: 141
Posted: 12:41am 29 May 2023
Copy link to clipboard 
Print this post

Nick,
I can confirm what you have seen in your original post.  When I run my 4:3 LCD monitor in Mode 1 with a small font (not sure if it would be as notifable with larger fonts) I get a blurring of the characters towards the right hand end of the screen.  I don't seem to have the same problem with Mode 2.  I know that Mode 2 is still running at 640x480, but it isn't switching the colours at that rate, so maybe it's only noticable for the high rate switching.

I have yet to fiddle with the settings of the monitor to see if it goes away.

I'm using the Silicon Chip kit PicoMiteVGA.

Hawk
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 04:12am 29 May 2023
Copy link to clipboard 
Print this post

  Hawk said  Nick,
I can confirm what you have seen in your original post.  When I run my 4:3 LCD monitor in Mode 1 with a small font (not sure if it would be as notifable with larger fonts) I get a blurring of the characters towards the right hand end of the screen.  I don't seem to have the same problem with Mode 2.  I know that Mode 2 is still running at 640x480, but it isn't switching the colours at that rate, so maybe it's only noticable for the high rate switching.

I have yet to fiddle with the settings of the monitor to see if it goes away.

I'm using the Silicon Chip kit PicoMiteVGA.

Hawk

Hi,
I am happy I'm not the only one who saw these artifacts.
On my monitor an EIZO flexscreen S1921 I could adjust clock rate and phase. Not all monitor do have those adjustments. In mode 2 it was much less visible. In the instruction manual of my monitor they used a special program to help adjusting the monitor that generates several patterns. I made a small program that does the same and adjusting was simple... On another monitor (1080P with VGA input)  I could not do these adjustments unfortunately.
Greetings,
Nick de pe1goo
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 06:19am 29 May 2023
Copy link to clipboard 
Print this post

Nick,

What you are seeing could be caused by a small timing issue in the horizontal frame.
When I have recovered from my hospital treatment, and get to the office I will put the VGA on a LA and measure.
I did this behoren, and then it was okay, but small changes since then can have effect.

In the mean time you could help this problem by adding 47 ohm resistors in hsync and vsync to check your malfunctioning monitor.

Volhout
Edited 2023-05-29 16:21 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 12:09am 30 May 2023
Copy link to clipboard 
Print this post

@ Rob - So noted on the HDMI labelling.  So, does that mean you could put an HDMI socket on something, generate true HDMI, but simply not put the logo on the product, and you'd still be able to do that?  I might be pushing it a bit there.

This is simply a small digression.  In no way could HDMI or DVI be used.
But I always thought it was a HARDWARE LICENSING issue, in that you are using trademarked technology, and it wasn't just a case of a copyrighted logo - leave the logo off, and everything is fine kind of thing.  

I probably need to read up on HDMI licensing, as they might have relaxed or changed the license since the last time I read about it, but it is irrelevant anyway really, as HDMI or DVI would never be possible on the PM, and if you were using a Raspberry Pi SBC - assuming you could GET one - they will be licensing the HDMI part of it, so it is not something you need to worry about anyway.  Just for your own design that uses that interface.

As another member quite rightly pointed out: "Why would you want HDMI for 640x480?"
The HD in HDMI stands for high-definition, and 640x480 is most definitely not anything near HD!  
Smoke makes things work. When the smoke gets out, it stops!
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:34am 30 May 2023
Copy link to clipboard 
Print this post

You can generate DVI on the RP2040 at RGB565, but it's still only 640x480.

The only reason not to stick with VGA is that there are now less monitors that support it than there used to be. There's not a shortage though. Not all monitors have DVI connectors either now - many are HDMI and/or DisplayPort only.
Mick

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

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 07:45am 30 May 2023
Copy link to clipboard 
Print this post

  Grogster said  HDMI has been talked about many times, but the main problem is LICENSE issues.
Any product that uses HDMI, has to pay a license fee to the HDMI federation outfit, whereas legacy VGA is totally free to use.  It is also impossible for the 2040 chip to produce HDMI output so I understand, but even if it COULD, the license fee issue remains, so it is simply not economic to use HDMI - at this stage.


DVI has no licencing issues and can be fed to an HDMI socket
DVI needs just 8 resistors and some clever code, read about it here
It can do 640x480 and even 720P at a push
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 08:03am 30 May 2023
Copy link to clipboard 
Print this post

Being able to generate the video and having resources to do anything useful are two different things. :) It's a balancing act of one against the other to keep the system usable.

Basically, if you need nice, big, fast, colourful video then use a system that has a GPU. Nothing else will work. Even the best processors will need some serious kludging. Just get a GPU and be done with it. That's why they were invented.  :)
Mick

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

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 10:26am 30 May 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  Being able to generate the video and having resources to do anything useful are two different things. :) It's a balancing act of one against the other to keep the system usable.


I didn't mention DVI for video purposes, monitors with vga inputs are getting harder to find but all the new ones have hdmi inputs
Also for playing games on the MM or Picomite it would be great if you could just pluf it into your TV using hdmi instead of having to use a tiny screen or if you have one a monitor with a vga input

I actually use my large TV as a computer monitor with the computer behind the sofa out of the way, it's easier as I'm obviously not watching tv while on the computer, and the screen is easy to see

Obviously if someone wants fancy graphics, video, or "modern" games they'd get a dedicated games console, or use a fancier board with video built into it
Edited 2023-05-30 20:27 by lew247
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 03:00pm 30 May 2023
Copy link to clipboard 
Print this post

  lew247 said  DVI needs just 8 resistors and some clever code, read about it here
It can do 640x480 and even 720P at a push

It's not a simple tweak to the PicoMiteVGA software, though...

(And you'd have to keep the PMVGA's colour limitations else MMBasic+user code won't have enough RAM.)

Maybe there's a cheap VGA to DVI (or to HDMI) board?

John
Edited 2023-05-31 01:04 by JohnS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 03:39pm 30 May 2023
Copy link to clipboard 
Print this post

erm...
Programming Challenge.
Write a program for a Raspberry Pi to emulate a VGA monitor. It should output 640x480 16-bit colour via HDMI.

:)




(No, I'm not serious and no, I've not thought this out at all! :) )
Mick

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

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 04:12pm 30 May 2023
Copy link to clipboard 
Print this post

  Mixtel90 said  erm...
Programming Challenge.
Write a program for a Raspberry Pi to emulate a VGA monitor. It should output 640x480 16-bit colour via HDMI.

You mean DVI using a HDMI socket  
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 04:30pm 30 May 2023
Copy link to clipboard 
Print this post

  lew247 said  
  Mixtel90 said  erm...
Programming Challenge.
Write a program for a Raspberry Pi to emulate a VGA monitor. It should output 640x480 16-bit colour via HDMI.

You mean DVI using a HDMI socket  

May as well actually be HDMI as RPi has hardware for that.

The program is a terminal emulator - just send VT100 escape sequences from the Pico :)

John
Edited 2023-05-31 02:35 by JohnS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 04:52pm 30 May 2023
Copy link to clipboard 
Print this post

I did all this ages ago using a pi zero as the HDMI I/F but no-one was interested

see

this

and

this

Video of MM2 driving HDMI display here
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 05:32pm 30 May 2023
Copy link to clipboard 
Print this post

You were ahead of your time!

(Though RPi boards are not all readily available.)

John
 
     Page 2 of 3    
Print this page
© JAQ Software 2024