It is common to use FPGAs to create a VGA signal for a given project. There are several issues with this:
- The FPGA must be configured
- The FPGA configuration may not provide a standard protocol
- Speed limitations due to it not being "real" hardware
- Higher cost
We can also use microcontrollers, like the Parallax Propeller, but these are limited by memory, and implementing the behavior in software often creates a lot of limitations. It is clear that some dedicated video chip should be used. Ideally, it should be cheap, fairly standardized, and capable. As it turns out, the RA8875 seems to meet these requirements, and I'd guess other chips may as well. To my knowledge, there are very few dedicated VGA chips that meet these requirements.
It makes sense that an LCD driver IC would work so well: devices needing these sort of chips are mass produced and have been for over a decade. Generally, devices needing these ICs have lower resolutions and are sold for lower prices, so the chips more fit our needs for a simpler and cheaper video output.
Will it actually work?
The RA8875 provides the needed HSYNC and VSYNC signals for VGA - I would assume that driving and LCD monitor, from a protocol perspective, is not different from any other video protocol in using HSYNC, VSYNC, and video timing. Essentially, the RA8875 just sends a stream of color data, very much similarly to CRT scanning behavior. As far as I can tell, there are no important differences, and when configuring the RA8875, similar timing parameters to that of VGA must be specified, namely the width of various video periods. In fact, the protocol somewhat reminds me of the uPD7220's protocol - see my project on that chip, where I did something similar: #uPD7220 Retro Graphics Card (and VGA hack)
In short, I can see no reason this wouldn't work. The only catch, is that a few other chips are needed to adapt it to work for VGA:
- THS8135PHP - This converts the digital color from the RA8875 to the analog color needed for VGA
- 74ALVC164245DDG - Level shifts the RA8875's 3.3v logic to 1.8v, required for the THS8135PHP
- Other logic: configures polarity of HSYNC and VSYNC, more level shifting, 1.8v regulation
A multifunctional PCB
Since the RA8875 is an LCD driver, I can make one PCB design that can be used for driving an LCD, or providing a VGA signal. The hardware and software interface to a microcontroller does not change.
The board design I'm making for this project has an 8-bit parallel interface compatible with my #Z80 overpowered computer, as this bus is the standard I'm using for everything now. The board also has an ESP32, which is optional - this way the board can be used stand-alone, or to implement a software defined keyboard (more on that in a different project). And, of course, an LCD interface can be used instead of VGA if desired. This board is basically designed to be assembled a-la-carte for whatever needs a project has.
Brief RA8875 Specifications
- Up to 800x480 pixels
- Both 8-bit parallel interface and SPI interface available
- 768KB internal RAM
- Hardware accelerated drawing of shapes, and two fonts provided for faster text drawing
These specifications are part of the reason I would want to set up a VGA driver this way - this is a very powerful IC that isn't that difficult to use in a project, and seems somewhat flexible.
Adafruit has an RA8875 breakout and some nice screens to go with it - I rather like it. Only complaint is that they don't have one with capacitive touch :P - in any case, my favorite setup so far is an Adafruit 7.0" touchscreen, the RA8875 breakout, and a manually added 7.0" GT911 capacitive touch panel, which I got off of Ebay, and fit perfectly. Now I am going to roll my own board for a nicer project, and more control over the design. And, of course, to support VGA!