3 ms·
Why is it always analogue output with these kinds of devices? It seems to me like it should be easier to do some form of digital out, but you never see small mi
by traverseda 4y ago
Why is it always analogue output with these kinds of devices? It seems to me like it should be easier to do some form of digital out, but you never see small micro-controllers implementing any kind of digital video output. Is it just because current video standards are bloated and terrible (HDCP, really complicated spec, etc) or is there some more fundamental reason why analog out is so much easier?
- mbilker 4y agoApparently, there is a digital video output project for the RP2040 already out there [0]! As for why digital video is more rare, it is because the common digital video formats are higher bandwidth and require higher signal integrity. [0] https://github.com/Wren6991/PicoDVI https://github.com/Wren6991/PicoDVI
- molticrystal 4y agoI looked at how USB was bit-banged on an arduino and I'm sure some of the problems involved are common with this. One constraint is VGA is at minimum around 25mhz and HDMI is at minimum 165mhz and a pico is around 133mhz. It also takes clock cycles to update the data and run algorithms. Some of the algorithms can often be mitigated to the silicon that controls some of the pins as they can have small bit of programmable logic for this purpose or can be re-purposed, but usually not all the pins or all of the algorithms. There are tricks and such that might be able to get it working in certain lower resolutions and color modes, perhaps like overclocking or taking advantage of some harmonic, or clever use of some existing feature, but the more tricks you do to get things faster,often introduce issues with stability that you have to mitigate or solve. This barely touches physical constraints like cord length, signal integrity, voltages and current, overheating, etc that may or may not be applicable.
- komadori 4y agoA TMDS symbol is 10 bits long so a pixel clock of 25Mhz needs a DVI bitrate of 250Mhz. You can generate DVI with an overclocked RP2040[1], but even then you have to halve the horizontal resolution because the general TMDS encoding algorithm is expensive to perform in software. You could, however, replace the VGA resistor DAC with a dedicated DVI encoder IC like the TFP401. [1] https://github.com/Wren6991/PicoDVI https://github.com/Wren6991/PicoDVI
- detrites 4y agoNot an expert, but with a back of a napkin guess, the minimum for say digital HD, might be something like the following: X x Y x colour_bytes x frames x 8bits Eg, 1280x1080x3x60x8=1.99Gbps So at 133Mhz, each cycle the RP2040 would have to push 15 bits out. It's got 2x cores, can be overclocked at double reliably, and has a bunch of programmable IO machines, so maybe doable, but likely not 4K. (More around 10-20Gbps.)
- wvenable 4y agoThere is a DVI sock for the Pi Pico: https://www.elektormagazine.com/news/dvi-sock-hdmidvi-for-the-raspberry-pi-pico https://www.elektormagazine.com/news/dvi-sock-hdmidvi-for-th... Analogue output is actually easier that's why it's done. Here, you just have to push out some signals at the right (slow) timing and you get a picture. DVI/HDMI requires pretty decent technology to do effectively.
- hakfoo 4y agoMaybe it would make sense to have a "framebuffer chip", that handles things at a fairly abstract level-- commands like "set screen dimensions to 640x480x8bpp", "write buffer #12, pixel (203, 122) as colour 0xF3", "toggle buffer #5 to active display". Let the "framebuffer chip" handle the timing sensitive HDMI/DVI dance, and then you can use the general-purpose controller for things like "map a more well-supported graphics protocol to this language". If the controller fails to meet a timing requirement, the framebuffer chip doesn't cause the monitor to lose synch, you'd just get a torn image because it wasn't fully populated in time for the frame to render. What I've been waiting for is some sort of "modern MCU as replacement for expensive, clunky, slow old video cards." It seems like if you want to use something like a Pi Pico, it would use almost all of the resources just to maintain synch and timing, so it might not be amenable for the other half of the job-- monitoring the external bus and waiting for inquiries on the framebuffer/firmware/support register address ranges.
- wvenable 4y agoMost small LCDs have a controller chip that manages the framebuffer and have a high-level interface like you describe. However, using these interfaces is still very slow. Much slower than this VGA interface. The Pi Pico has 2 cores so while one core is used entirely to maintain the display the other core can do other things.