How to Build an Arcade Obstacle Avoidance Game Using FPGA

Image result for obstacle avoidance game

Hello FPGA innovators! Remember the arcade obstacle avoidance game where blocks of pixels fall on you and you steer clear of them moving left or right? Today’s project attempts to re engineer the same game using a VGA and FPGA. Here, a pseudo random code is used to generate obstacles that fall down and buttons on the FPGA are used to move the cursor so that none of the obstacles hit it.

The only hardware required to execute this project is an FPGA board (you might need to adapt yours if different from the author’s), a computer monitor and connection cables. This is because the FPGA board has inbuilt push buttons that can be used to move the cursor of the game, and also has the necessary DACs and VGA interfaces required to run the game.

The coding done by the author is in VHDL and everything starting from a functional flowchart to running the bit file for FPGA has been described from steps 1 to 9. Since the buttons on the FPGA has a bouncing issue, a separate debouncer code needs to be run which is available on step 2. Details regarding the VGA, coding for random obstacles and checking for collisions and updating the game are given from steps 3 to 7.

Though the authors put in 50+ hours of effort and made a great attempt, the game still could be done in a lot more simpler ways. The main code is available in the introduction to spare other followers from putting in more additional effort, but starting from choosing a different FPGA board to running through basics of other games implemented using VGA and FPGA can end up delivering something better with a lot less effort.

Give it a try and have fun!

Process VGA without Frame Buffers using FPGA

Hello explorers of the FPGA Kingdom! Today’s project digs into the scope of FPGA as a tool that can replace conventional techniques further. VGA or video processing through conventional means requires a frame buffer which stores a block of data regarding pixel information in the system RAM for video display which is transferred to the display device at the right time using real time means. FPGAs can replace these frame buffers in a novel way such that the system RAM utilized for this remains free at the cost of a little more real time computation.

The developers used a DE2-115 FPGA board along with a Wolfson Audio Codec to animate 4 characters on the screen such that they appear to be dancing to the beats of the music played. Apart from those hardware elements, a monitor (graphics module) was used.

The coding was done by the developers using MATLAB since the project requires the use of filters through DFT and MATLAB has functions readily available for this. THE DFT is used to filter out the lowest frequency component (which will be the percussions or beats) and then calculate the interval at which this repeats. Once this information is obtained, the music is passed on from the ADC of the Codec to the monitor through the FPGA for animation.

The graphics on screen are programmed in modules such as a “head” file, a “body” file, an “arms” file, and a “legs” file which induce movements to the body parts depending upon the information processed by the FPGA from the rhythm of the music played. For a detailed explanation regarding the project, design, testing and systems integration you can visit the developers’ page here.

The result of this project can be seen here.

Though the project is not a replacement to the fast and efficient way of processing VGA through Frame buffers, it certainly explores the academic value and versatility of the FPGA as a tool that can be used for multiple purposes.

By C. Archard and N. Levy

How To Create You Own Design Displayed On A RGB LED Matrix With Your FPGA

Today´s article presents a fantastic video tutorial about designing and building your own FPGA RGB LED matrix to display anything you want.

Nowadays it´s pretty easy to buy an RGB LED matrix on internet, so you only need to connect your FPGA to it and build and implement your own design. So, you better follow along this great video where the authors will teach you the fundamentals to do it.

In the video the authors take some time explaining how the actual board works. Listen carefully to it as very important design details are revealed. The designer of this specific FPGA code shows a block diagram (with the main components, PLL, UART and Display Controller) of its design and explains it step by step, sharing even some simulations from both the software and the actual signals measured on the FPGA board to proof that the design is working exactly as it´s supposed to. Thus, a pretty good learning experience for you here.

Finally, you can download all the FPGA design files here. Use them as a guideline on your own design, which I strongly recommend you to do. And if you don´t have the time nor the knowledge to actually build the RGB LED matrix board, you can get yours here.

Watch the video and then get hands on to create your own design so you actually learn how to do it.

Have fun!


By Shahriar

Building a multi-peripheral controller with a GPAK4



In today´s article the author describes a project developed by one of the prize winners. What prize winners? What prize at all? Ok, let´s rewind a little here. The author talks wonders about Silego´s GPAK chip and so those guys were very excited about the interest generated that they decided to give the author 25 development kits of the GPAK4 (the prize). What could our starring character do with 25 dev kits on his hands??? He launched a contest and the 25 winners, those whose projects were most interesting, would win one of the dev kits.

Well, now that we all know what we are talking about…Wait, what is a GPAK4? Fair enough. A GPAK4 as the author defines it is “a super-small, mixed-signal FPGA that you can literally design and program in just a few minutes, and that cost only a few cents each”.

After this quick introduction, I would say that the article moves on to explaining some of the details of the logic design implemented on the GPAK4 FPGA for its multi-peripheral controller. The main advantages of implementing this tiny device are offloading the host MCU, saving GPIOs and simplifying PCB layouts. You will be able to see some of the simulation results and if you are interested you can download the whole design file here.

Stay tuned for the remaining 24 projects and for another giveaway…


By Max Maxfield

How To Control A LCD TFT Using Your FPGA (Or Someone Else´s)?


Not long ago, we published some articles about controlling different kinds of displays, using your FPGA. On a VGA screen, on a small LCD screen, on a PSP LCD or even for the old, but nasty-analog-signaled NTSC system.

And today, we share with you another great tutorial on how to control a LCD TFT, that takes advantage of the ability of a FPGA to fully control what happens on every single clock cycle.

You may think, well, another LCD tutorial, more on the same…And you will be wrong. There are no identical systems. Each one has its own features which make it unique, and we want you to know them.

This is a very well explained tutorial that gives you all the files you will need to successfully implement it: schematics, VHDL code files, Project files, datasheets of the display…Everything!

The schematics are required for a small LCD Breakout board that interfaces between the FPGA and the LCD screen. You may try to build your own…

In addition the author takes some extra time to explain what really matters about this project and what makes it different from any other “How to control your LCD screen with your FPGA”. To properly control a TFT display you need two specific timed signals: DCLK (Pixel Clock) and DE (Data Enable). Why the code lines that control these two signal are coded the way they are is carefully explained in the article so you don´t want to miss it. Understanding this will make you capable of playing with any other TFT screen you may find.

Now it´s your turn!


By T. Jespersen

How To Use Your FPGA To Display Things On A PSP Screen!


Welcome back to the track of using your FPGA to display things. Today´s tutorial will teach you how to use the LCD screen of a PSP to display colour graphics from an FPGA. The main goal is to show three colour stripes on the screen but the author goes beyond that and adds a quick intro about displaying more complicated graphics. That´s for you to explore and invent or wait for the next tutorial.

The great advantage of using an LCD screen, instead of traditional screen is getting rid of the annoying analog VGA signals. Everything here looks like zeros and ones. On the bright side, LCD technology is pretty similar to CRT and thus the controllers take almost the same input signals.

As any other project from this guy, this one is also very thoroughly explained. You will find the part list plus all the schematics, among other nice stuff.

Although the core of this project is programming the FPGA with VHDL to properly control the PSP LCD screen, there is also some handwork. Quick thing but funny as always. Going back to the brain, it´s very important that you follow the theory explained to properly understand what the code is doing. Yes, the code is given, but you should understand what is going on there if you want to display pretty cool things.

What´s left now is you to take action and show us what you can display on the LCD screen!

Have fun!


By Chris

How to Display Video On A Screen With Only One Wire


In today´s article we bring you a great tutorial about NTSC. For those who don´t know this, NTSC is another video standard, like VGA, very popular in the Americas and Eastern Asia. However, unlike VGA, NTSC only uses 1 signal wire!

The principal behind that is quite complex. Thus, the example developed on the article only aims at displaying black and white images. Luckily, all the physics that NTSC is based on are explained here so we encourage you to go on and play with NTSC color signals.

This is a highly recommended tutorial that only takes 1 hour to do! And it is very cheap to set up, remember that there is only 1 signal wire. Oh yes the code! The controller is built using an FPGA running VHDL, which is given =).

Don´t miss this article and try to implement the recommendations at the end, substituting the resistors for a DAC.

Happy play!

By Chris

How To Control What You See On A Screen in Two Hours and For Less Than $25!

Imagine how cool it would be to control what appears on your screen and at a bargain price, just using your FPGA (yes! Your Papilio!) and some other easy-to-get components.

All you need is read today´s article (and buy the tiny things of course). This how-to post is one of those which are written thinking of the user. It explains everything, even the physics that rule the system.

For this specific example, a DAC resistor is connected to the FPGA on a CPLD board so it can output 512 colors to a VGA screen. Knowledge of VHDL is needed in order to implement your own code, otherwise, simply use the one given although you can follow the links on the article to learn some more about VHDL.

The real advantage is that you will be able to implement your own VHDL modules so you will actually control what appears on the screen!


Now it´s your time. Show the World what you can do…through a VGA monitor!


By Chris