The Best USB To VGA Converter For The Job

There are many adapters, dongles, and cables designed for interfacing display standards, and no doubt some of you have them in the glue of your entertainment system or work space. They’re great for standards, but what about something that’s not quite standard? [Stephen] has an arcade cabinet with a CRT that runs at an unusual 336 by 262 pixel resolution. It can be driven as 320 by 240 but doesn’t look great, and even that “standard” resolution isn’t supported by many dongles. He’s shared the story of his path to a unique USB to VGA converter which may have application far beyond this arcade machine.

We follow him on a path of discovery, through RP2040 PIOs, simple resistor ladder DACs, and home-made kernel modules, before he arrives at GUD, a USB display protocol with its own upstreamed Linux kernel driver. It’s designed to be used with a Raspberry PI deriving an LCD or HDMI display, but for his task he implemented the protocol on one of the more expensive STM32 series microcontrollers. The result after several false starts and some fiendish PCB routing is a standalone GUD-based USB-to-VGA converter that delivers perfect 34-bit colour at this unusual resolution, and also presumably others if required. It’s a worthwhile read for the many hints it gives on the subject of driving displays, even if you’re not driving an odd cabinet monitor.

10 thoughts on “The Best USB To VGA Converter For The Job

  1. So if they want to eventually use a laptop to drive the display, why not just get one with a VGA port and configure it to the desired resolution and refresh rate? I’m not quite understanding why it had to be over USB.

    1. Lots of things with VGA ports can’t draw a sufficiently low pixel clock. At best, most support the same original 12.6MHz that the original VGA card used for its low resolution modes, but this needs 6.4MHz.

      The only graphics card I ever encountered that supported lower pixel clocks was Matrox’s G200/400/450, which has a register to optionally divide the pixel clock by 2 or 4.

  2. CRT that runs at an unusual 336 by 262 pixel resolution

    CRTs dont have pixels or exact horizontal resolutions :) Its ordinary 15.7kHz CRT, 240 visible lines. Previously they ran it with Gert vga666 set to 240 visible + porches = 262 https://www.frankchiarulli.com/blog/building-the-rcade/

    Article:

    length-matched traces between the STM32 and the HyperRAM. Length-matching ensures that all the signals arrive at the same time; if some arrive too early or late it can cause issues
    later on Author states
    I basically redesigned the entire board from scratch. … but I needed completely new RAM (the new chip has no HyperBus)

    but he doesnt use hyperbus
    there is SDRAM on board, but memory.x says its not used at all
    this micro has 1MB of SRAM so no external ram would be needed anyway at those small framebuffer sizes

    Looking at PCB:

    huge cuts in ground plane right across Ram address/data bus, good thing he doesnt use this ram at all :)
    whole PCB ground plane is cut in half by ram and VGA routed in the ground layer :o
    0.3 hole 0.4 diameter VIAs have extremely small annular ring, afaik very bad idea leading to manufacturing/reliability problems. I am guessing author tried to make small clearance VIAs but instead broke them while leaving huge (0.5mm) clearances overridden by GND/Power plane settings. Those settings arent entirely obvious and one might give up trying to find what is locking clearances.
    usb impedance mismatch, but meh its short
    usb differential impedance mismach is bad with one DM crossing thru two vias, length mismatch by ~120mils
    bypass cap right along USB High speed track also not good
    all usb ULPI signals going over huge ground hole no bueno

    This is probably the part where I’m supposed to say that like, crosstalk is bad and stuff, but we’re just gonna ignore that. I had like no space; leave me alone!

    Length matching (up to 10mm margin) will be less important on 60MHz ULPI than crosstalk between 4mil tracks routed with just 4mil clearance without solid ground underneath.

    Im loving the can do plowing thru obstacles attitude. Author got there in the end and made working solution to his initial problem.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.