SDRAM + VGA + FPGA = SPI Addressable graphics card!

Having already written an SDRAM based VGA controller, I’ve finally got round to writing a simple SPI module that allows my STM32F0 discovery board to write to the SDRAM during blanking. In the video above, I hadn’t implemented a “busy” pin so my STM32F0 was spamming pixels regardless of whether there was blanking or not. I’ve not implemented a FIFO so any pixels that are sent while the SPI controller is waiting for memory access will be lost.

SPI Protocol
For complete ease of design, the SPI protocol is exceptionally simple consisting of 3x 16bit transactions. The lowest 16bit word is the pixel to be written and the other 32bits are the memory address (though only 24bits of these are used), no other logic is implemented so the SPI side merely feels like an addressable memory slave.

I’ve not got the code “github ready” yet so that’ll have to wait!

Advertisements

5 responses to “SDRAM + VGA + FPGA = SPI Addressable graphics card!

  1. Dear Harris,
    That’s awesome work! Thanks a lot to share your experience here.
    In the meantime, did you clean up a bit your code to share it on Github, or could you just send it as it is? I’m very interested in the part to write from SPI to SDRAM.
    Many thanks in advance.
    Best regards,
    macload1

    • Its funny you mention this actually! I’ve recently started doing an overhaul of this entire project. I’ve recorded the SDRAM controller and I’m waiting for a VGA cable to arrive (I didn’t bring my monitor with me this term). Once this arrives, I should be doing a new post on the entire system – there are a few more components that I’ve added now.

      Thanks,
      Harris

  2. Pingback: FPGA + SDRAM + VGA + STM32F0 = UART controlled video card! Part Deux… | Harris' Electronics·

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s