VGA Output from STM32F4 Discovery board

Karl Lunt used the code of the VGA Output using a 36-pin STM32 project to create a full 800×600 VGA output using a STM32F4 Discovery board.

The Artekit gang developed a minimalist VGA implementation using one of the boards they sell, with a 72 MHz STM32F103 device on-board. I say “minimalist” because it uses just the board and a VGA connector, but you get 800×600 monochrome VGA out. Then they added code for doing simple graphics and text generation, and all VGA timing is done using DMA writes to an SPI channel. Their design has negligible impact on processor resources, so you could drop their VGA drivers into your project and see almost no hit to throughput.

Because of memory constraints in the chosen device, they only have room for 400×200 pixels. They implement this by assigning a 10K frame buffer, then writing out the pixels as 200 lines of 50 bytes each. Each pixel is sent twice and each line is sent three times. The result satisfies the monitor’s timing for 800×600 VGA, but the effective graphics resolution is 400×200.

Enter the STM32F4 Discovery board. It has plenty of room for a full 800×600 frame buffer and runs far faster than the original ‘103 device. All that is needed is to port their code from the ‘103 device to the STM32F4 processor and modify it to display a full 800×600 monochrome VGA. VGA output from a $15 board. With almost no CPU through-put hit. What’s not to like?

Read the full article and hackaday post.

Leave a Reply