VGA1306 (VGA-out for DIY Arduboys implemented on an FPGA!)


Very happy to finally announce that boards are now up for sale (assembled and tested on-site by matt of kitsch bent, and branded as ‘easy_VGA’) :smiley: at:

Continuing the discussion from Screen Mirroring Guide / How To Screenshot Your Game:

I have been working on a solution to use an FPGA in place of the SSD1306, outputting to VGA! :slight_smile:

The FPGA chip I am aiming at only costs around $7 (AUD), just need to work on a PCB design now - and then I should be able to produce a small board that could slot into any DIY Arduboy in place of the OLED, and plug into VGA… (the breadboard in the photo is just there for a 5V to 3.3V level shifter between the Arduino & the FPGA):

Midnight Wild - A Cowboy-Themed Metroidvania!
Discussing FPGAs
Screen Mirroring Guide / How To Screenshot Your Game
ArduCart - Rewritable Carts for an Arduboy with Interchangeable Games
[WIP] VGA-out (without FPGA)
(Erwin) #2

holy shit. this is awesome.

fpga is one of the things I want to learn some day :confused:

(Scott) #3

Awfully thin traces for power and ground. I’d use a flood fill to create a ground plane for GND and try to thicken up 5V and other power traces where possible.


Thanks, as I said, this is my progress so far, not a finished design - was just excited to be able to share something. This is using autorouter to get an idea of component placement - at the moment almost all signals can be routed on a single layer! (and the entire second layer is a ground plane)

Between work and family the time I am able to spend on this is not a lot… I can send Eagle files to you if you are interested in contributing some time to routing? (fair warning though, the draft schematic is UGLY!)


My hope is that this little board can also be a gateway for others to dip their toe into FPGAs, tweak the code, play around etc.

This is my first exploration into that world too, and I feel now like people make it seem a lot more complicated from the outside than it really is! At least with a simple little board like this, you can get your head around what every single component is there for and the limited number of signals coming in and out means the code is much easier to follow!

(Scott) #6

I’m sorry but I don’t really have the time. Also, I prefer KiCad over Eagle.


…testing invert() and allPixelsOn(), and resistor values:


Have hijacked the otherwise unused CS pin to trigger invert, like so:

          if(cs) begin //inverse
            vga_r_r <= 0;
            vga_g_r <= 0;
            vga_b_r <= 0;
          else begin
            vga_r_r <= 1;
            vga_g_r <= 1;
            vga_b_r <= 1;

Which would also easily lend itself to being used as a select pin to choose between two different preset mono palettes for the display instead of invert… with a choice of 8 colours:

(Erwin) #8

What do you recommend as a cheap stater kit for fpga development? Like something that runs your VGA1306 code to try it out?

Have you seen ?


Have not seen that one before, no.

What I would recommend though, is one of the iCE40 boards supported by the open-source ‘IceStorm’ project (look for ‘iCE40 Boards’ towards the bottom of this page):

I went with a ‘myStorm BlackIce’ board, mostly because there is a fairly active community already in place - but it was not exactly ‘cheap’, and the supply of boards has been limited so far, coming periodically in smaller batches.

There is the ‘iCEstick’ made by Lattice themselves which looks nice, and has 24 GPIOs broken out:

And I have also stumbled across a couple of even smaller boards!

This one (although IceStorm states only ‘experimental’ support for the iCE40-UP5K-SG48):

and this one:


Also this series of videos was helpful for me to start to get a grasp on Verilog:

(Kevin) #11

This is some next level stuff man. FPGA, wow! FPGAboy? LOL.


…more testing (prototype PCBs are in production!) just for fun, have added in a separate Arduino with a PS3 controller connected to a USB Host shield, translating button presses into HIGH / LOW pins:

Rotating-monitor-stand-in-portrait-orientation FTW!! :rofl:

(Simon) #13

Look at how those numbers are properly orientated … beautiful!


Testing Compatibility with the Adafruit SSD1306 Library (Hardware SPI first, and then the slower Software SPI):


Assembled boards have finally arrived!

(almost a full 7 weeks after ordering… Happy Chinese New Year everyone! :dog: :dog2: )

(Simon) #16

They even have your name in the top-right corner!’

But do they work?


…they absolutely DO!! :astonished: :crazy_face:

Here’s one attached to a Pro Micro running @Mr.Blinky’s streaming-bootloader demo:


Nice! now you can play Arduboy on those huge ass Video projectors :smiley:

Does it also support commands like invert?


At the moment I have it using the otherwise unused CS pin to trigger invert, so my version of the Arduboy2 function for that is:

void Arduboy2Core::invert(bool inverse)
  if (inverse)
    bitSet(CS_PORT, CS_BIT);
    bitClear(CS_PORT, CS_BIT);

And am also using the DC pin as a sort of VSYNC signal by setting data mode at the beginning of each frame sent, eg:

void Arduboy2Core::blank()
  for (int i = 0; i < (HEIGHT*WIDTH)/8; i++)

It’s possible to write more code to properly interpret the SSD1306 commands, and I am happy for anyone to help improve the Verilog source! :slight_smile:


I had the boards made by Seeed, and they now have a big sale on for this month:

Which is making me consider whether I should try running a Kickstarter or something to try and get 100 orders together quickly and take advantage of the sale… I had 10 made in this run, and that worked out to over $40 per board with setup costs etc, but once you get up over 100 and into the bigger quantities, it knocks the cost per board down a lot…