VGA Output on Teensy 4.0 and 4.1

IBM introduced the Video Graphics Array (VGA) standard in 1987, improving on EGA’s 16-color graphics with up to 256 colors and a maximum resolution of 640×480.

Inspired by the uVGA library for Teensy 3.X by Eric Prevoteau, PJRC forum user Jean-Marc developed the VGA_t4 library for 4.x boards. With a handful of resistors and 15-pin D-sub connector, your PSRAM’d Teensy 4.x can output 307,200 8-bit pixels of analogue goodness too — perfect for emulators and retrocomputing projects!

While the implementation differs from the original uVGA due to differences between the Teensy 3.x and 4.x hardware, the code should feel familiar to anyone familiar with the uVGA API. The library currently supports 320×240, 320×480, 640×240, and 640×480 resolutions, with experimental support for 352×240, 352×480, 512×240 and 512×480. Sketches must be compiled at 600MHz for accurate timing. The library and source can be found on GitHub, and the video below demonstrates its use to display a Mandelbrot fractal, as well as Amiga Workbench courtesy of Jean-Marc’s MCUME retro emulation project.