The Raspberry Pi B+ has a native VGA connection. Sure, it’s hidden away in binary blobs and device trees, and you need to wire up the GPIO pins just right, but it’s possible to connect a VGA monitor to a Raspi B+ natively. For the brave, smart, or foolish, this means you can also drive raw DPI displays. [Robert] had a few of these dirt cheap displays sitting around and decided to give the entire thing a go. It worked, and he’s written down how to do it.
One of the chip architects for the Raspberry Pi, [Gert van Loo], was exceedingly clever when designing the Pi. There’s a parallel interface in the chip that, when combined with a few dozen resistors, can drive a VGA display in addition to the HDMI display. Screens with a Display Parallel Interface are actually pretty similar to what the VGA spec calls for. The problem is, hardly any of this is documented for the Raspberry Pi, and finding it means trawling through forums.
[Robert]’s example circuit uses a 5″ display from Adafruit, a 40-pin breakout, and a bunch of prototyping wires. Setup requires grabbing a cut down version of the device tree used for the Raspi VGA breakout board, setting the output format, rgb order, and aspect ratio of the display, and wiring everything up.
What’s interesting here is that [Robert] reproduced this project from scratch, and found that any display with a 40-pin DPI connector will work with the Raspi, provided you have a datasheet. That’s pretty cool; these displays can be cheap, and since we don’t yet have a proper DSI display for the Pi, this will have to do for now.
Video below of [Robert]’s inspiration for this build, [Ladyada].
Continue reading “Using Cheap Displays With The Raspberry Pi”
Generating VGA is a perennial favorite on the Hackaday tips line, and it’s not hard to see why. Low-res video games, of course, but sending all those pixels out to a screen is actually a pretty challenging feat of coding. The best most project have attained is the original VGA standard, 640×480. Now that we have fast ARMs sitting around, we can bump that up to 800×600, like [Karl] did with an STM32F4 Discovery board.
The problem with generating VGA on a microcontroller is the pixel frequency – the speed at which pixels are shoved out of the microcontroller and onto the screen. For an 800×600 display, that’s 36 MHz; faster than what the 8-bit micros can do, but a piece of cake for the STM32F4 [Karl] is using.
[Karl] started his build by looking at the VGA project Artekit put together. It too uses an STM32, but a 36-pin F103 part. Still, it was fast enough to generate a line-doubled 800×600 display. [Karl] took this code and ported it over to the F4 part on the Discovery board that has enough space for a full 800×600 frame buffer.
With all that RAM on board the F4 part, [Karl] was able to expand the frame buffer and create a relatively high-resolution display with DMA and about a dozen lines of code. It looks great, and now we just need a proper application for high-resolution VGA displays. Retrocomputing? A high-resolution terminal emulator? Who knows, but it’s a great use for the STM32.
If circles and some text aren’t your thing, Artekit also has Space Invaders running on the 36-pin STM32.
This is a wonderful example of the phenomenon of “feature creep”. [Gert] was working on getting a VGA output running on an mbed platform without using (hardly) any discrete components. Using only a few resistors, the mbed was connected to a VGA display running at 640×480. But what could he do with something with VGA out? He decided to emulate an entire Sinclair ZX81 computer, of course.
With more than 1.5 million units sold, the Sinclair ZX81 was a fairly popular computer in the early ’80s. It was [Gert]’s first computer, so it was a natural choice for him to try to emulate. Another reason for the choice was that his mbed-VGA device could only output monochrome color, which was another characteristic of the ZX81.
[Gert] started by modifying a very lean Z80 emulator to make the compiled code run as efficiently as possible on the mbed. Then he went about getting a picture to display on the screen, then he interfaced an SD card and a keyboard to his new machine. To be true to the original, he built everything into an original ZX81 case.
This isn’t the first time we’ve seen a ZX81, but it is one of the better implementations of an emulated version of this system we’ve seen.
Thanks to [Jeroen] for the tip!
A few years ago, some vastly clever people figured out how to listen in on the LCD display on the classic brick Game Boy from 1989. There have been marked improvements over the years, including a few people developing VGA out for the classic Game Boy. Now, the bar has been raised with an HDMI adapter for the Game Boy, designed in such a way that turns everyone’s favorite battery hog into a portable console.
Your classic beige or cleverly named Color Game Boy is composed of two halves. The rear half contains all the important circuitry – the CPU, cartridge connector, and the rest of the smarts that make the Game Boy game. The front half is fairly simple in comparison, just an LCD and a few buttons. By designing an adapter that goes between these two halves, [Zane] and [Joshua] were able to stuff enough circuitry inside the Game Boy to convert the signals going to the LCD to HDMI. Plug that into your TV, and you have a huge modern version of the Super Game Boy, no SNES required.
The HDMIBoy also breaks out the buttons to the classic NES controller connector. With HDMI out and a controller input, the old-school Game Boy become a portable if somehow even more brick-like console.
One of [aepharta]’s ‘before I die’ projects is a homebrew computer. Not just any computer, mind you, but a fabulous Z80 machine, complete with video out. HDMI and DisplayPort would require far too much of this tiny, 80s-era computer, and it’s getting hard to buy a composite monitor. This meant it was time to build a VGA video card from some parts salvaged from old equipment.
When it comes to ancient computers, VGA has fairly demanding requirements; the slowest standard pixel clock is 25.175 MHz, an order of magnitude faster than the CPU clock in early 80s computers. Memory is also an issue, with a 640×480, 4-color image requiring 153600 bytes, or about a quarter of the 640k ‘that should be enough for anybody.’
To cut down on the memory requirements and make everything a nice round in base-2 numbers, [aepharta] decided on a resolution of 512×384. This means about 100k of memory would be required when using 16 colors, and only about 24 kB for monochrome.
The circuit was built from some old programmable logic ICs pulled from a Cisco router. The circuit could have been built from discrete logic chips, but this was much, much simpler. Wiring everything up, [aepharta] got the timing right and was eventually able to put an image on a screen.
After a few minutes, though, the image started wobbling. [aepharta] put his finger on one of the GALs and noticed it was exceptionally hot. A heatsink stopped the wobbling for a few minutes, and a fan stopped it completely. Yes, it’s a 1980s-era graphics card that requires a fan. The card draws about 3W, or about two percent of a modern, high-end graphics card.
The Broadcom SOC in the Raspberry Pi is actually surprisingly powerful, it turns out. It’s actually capable of driving a VGA monitor through the GPIO pins using a handful of resistors.
[Gert van Loo], Raspberry Pi chip architect, wizard, and creator of a number of interesting expansion boards showed off a VGA adapter for the new B+ model at the recent Raspberry Pi Jam in Cambridge this week. Apparently, there is a parallel interface on the SoC that can be used to drive VGA with hardware using a resistor ladder DAC. That’s native VGA at 1080p at 60 fps in addition to HDMI for the Raspberry Pi. Only the new Model B+ has enough pins to do this, but it’s an intriguing little board.
The prospect of having two displays for a Raspberry Pi is very interesting, and the remaining four GPIOs available mean a touch screen could be added to one display, effectively making a gigantic Nintendo DS. Of course there are more practical problems a dual display Raspi solves, like driving a projector for the current crop of DSP/resin 3D printers, while still allowing for a usable interface during a print.
The VGA expansion board, “is likely to have issues with EMC,” which means this probably won’t be a product. Getting a PCB made and soldering SMD resistors isn’t that hard, though, and we’ll post an update when the board files are released.
Thanks [Uhrheber] for sending this one in.
Ever since flat panel LCD monitors came on the scene, most old CRTs have found their ways into the garbage or into the backs of closets. For this project, it might be a good idea to pull out the old monitor or TV out and dust it off! [James] has found a way to hack the VGA input to these devices to get them to display vivid visualizations based on an audio input.
The legacy hardware-based project is called RGB.VGA.VOLT and works by taking an audio signal as an input, crossing some wires, and sending the signal through a synthesizer. The circuit then creates a high-frequency waveform that works especially well for being displayed on VGA. The video can also be channeled back through an audio waveform generator to create a unique sound to go along with the brilliant colors.
[James]’s goals with this project are to generate an aesthetic feeling with his form of art and to encourage others to build upon his work. To that end, he has released the project under an open license, and the project is thoroughly documented on his project site.
There have been plenty of hacks in the past that have implemented other protocols with VGA or implemented VGA on microcontrollers, but none that have hacked the interface entirely to create something that looks like the Star Gate sequence from 2001: A Space Odyssey. We think it’s a great piece of modern art and a novel use of VGA!
Thanks for the tip, [Kyle]!