https://github.com/cbmeeks/VgaPico
You might find my VGA-on-Pico implementation interesting too. My PIOs are very lightweight (4 PIO instructions for sync and 5 for rgb), yet flexible. The PIOs are configured dynamically for any display mode - tested up to 1280x1024@60Hz. You just fill out a small struct of VGA parameters:
Code: Select all
case VGA_1280_1024_60HZ:
params.pixelClockKHz = 108000;
params.hSyncParams.displayPixels = 1280;
params.hSyncParams.frontPorchPixels = 48;
params.hSyncParams.syncPixels = 112;
params.hSyncParams.backPorchPixels = 248;
params.hSyncParams.syncHigh = true;
params.vSyncParams.displayPixels = 1024;
params.vSyncParams.frontPorchPixels = 1;
params.vSyncParams.syncPixels = 3;
params.vSyncParams.backPorchPixels = 38;
params.vSyncParams.syncHigh = true;
Obviously, at 1280x1024, you'll be hard-pressed to feed it unique pixels, but doubled, it's fine.