The Zybo Board is one of the most powerful tools in FPGA and this is because it is FPGA combined with an ARM processor that widens the spectrum of possibilities with FPGA. Today’s post is yet another dive into Zybo’s possibilities and in this project a visualization of audio signals or music will be accomplished. The author has been very detailed about this project and has explained every aspect of it in 18 steps.
The Hardware needed for carrying out this project are the Zybo Zynq 7000 FPGA board, a neo pixel LED matrix, a 5V 10 A power supply, a female DC power adapter, 3 pin male to male header, a 1mF capacitor, an audio splitter and some jumper wires. The connection diagram is provided by the author in step 17.
The code basically uses the principle of FFTs to detect frequency components in the audio file. Depending upon the magnitude of frequencies received, the LED display has been programmed to light up. 16 steps starting from opening Vivado to run the code to generating a bit file for the FPGA has been provided by the author. You can download a zip file which contains all modules relevant to the project. The author has used a combination of C, custom Verilog and HDL to code the project. This gives an ease in defining GPIO ports and makes the circuit a lot simpler.
Another interesting aspect is that the FPGA has been so coded that with the help of switches, your LED matrix can either act as a spectrogram or as a visualizer seen in media players.
Let me challenge you to achieve similar results adapting your own FPGA!
The Hardware required for the project consists of the NIOS II FPGA, 6502 processor, Nesdev APU, SD card reader and a few other components needed to create the three primary blocks which are the timer block, length counter block and an envelope unit. These 3 blocks use a network of Mixers and PIOs besides the 5 channels available on the APU.
Out of the 5 channels available on the APU, only 4 channels have been used by the developers since the fifth channel (Delta Modulation Channel) is a time consuming endeavour. However the project does successfully emulate perfect chiptunes with the hardware. A detailed explanation of the Hardware used can be found here.
The coding used for this project is a combination of Verilog and C since FPGA and the 6502 are used. The Verilog Coding is used to extract Nintendo Sound Format files (.nsf) from the SD card reader onto the FPGA. The NSF files can be loaded on to the FPGA through the 6502 processor which has been coded in the C language using standard functions. NSF files can be stored on the SD card using a computer.
The NIOS II FPGA acts as an NSF player in this particular project. It can be used to control playback, stop tracks or forward and rewind to the next or previous track.
Using just 4 channels in the APU the developers have done an amazing job and an example of the fruits of their labour (and an inspiration!) can be seen here.
Hello FPGA and Arcade games fans! A couple of weeks ago we posted about how to play the Snake game on your FPGA in fore easy steps, our community member mkarlsson was not totally satisfied with the amount of FPGA resources the Verilog code uses and decided to rewrite the game to make it use less resources and now it even fits an LX9 based board like Papilio Pro or Duo with a VGA wing:
The GadgetFactory blog page has this story about the snake game written in Verilog so I decided to take a look at it. Sadly to say it’s pretty much a textbook example of how not to write HDL code. However, this idea seemed pretty cool so I decided to do an almost complete rewrite of the code (basically the only thing left from the original code is the VGA controller) while still keeping all the functionality of the original code. The new version uses about a 1/4 of the FPGA resources compared to the original code when compiled for Spartan6 and it now fits an LX9.
Hi again FPGA people! Today I have another game for you to implement using your FPGA, Simon Says for 2 players. I know it´s a pretty old game but I promise you that it´s a very interesting project.
In this project you will have to make use of your hand skills both for coding and for connecting and playing with cables and stuff.
User input comes from a set of modified Rock Band drum kit.
WARNING: If you don´t want to play Frankenstein with your set of Rock Band drum kit, stop reading or find an alternative!
Right, so you will need a bunch of things to modify your drums: a breadboard, some resistors and caps, two dual retriggerable monostable multivibrators, wire and a ribbon cable. Everything is very well detailed in the article and they have even shared the schematics as well as all the project files. Click here to download them.
The other two major modules for this project are the output to a VGA monitor and the store & check module that compares the inputs from the two players to determine whether they match or not.
For the code the authors used Verilog HDL. I always recommend you to think and write your own code instead of just copying what is given, but this time I won´t. I would just say copy it and implement it. Then, try to develop any of their suggestions for improvements. We would love to hear what you have achieved.
Welcome back again FPGA addicts! Today we have a very interesting and useful project for you: Build your own alarm system with your FPGA.
This work was carried out by a group of students and it could perfectly serve as a baseline for any alarm system.
The project is developed in 6 easy steps. All you need to replicate it is the following: a FPGA (they used an Altera DEs-115 Cyclone IV), an IR Beam Break Sensor, an Arduino LilyPad Buzzer, a breadboard, some wires and a pull-up resistor. As you can well infer there is some minor manipulation in this project which is always funny and distracting. Cool stuff.
The alarm system is comprised of three modules: the main module, the display one and the sound module. The FPGA runs all the code. It receives information from the IR Beam Breaker Sensor and controls both the LED display to show whether the alarm is armed or not and the buzzer. The functioning of the alarm is quite simple, if the alarm is armed the LEDs will display “ON”, during this state if the IR beam is interrupted then the buzzer will go off and make noise. In any other state the alarm won´t activate and so there won´t be any acoustic sign and you won´t know if someone broke into.
All three modules are explained in detail, thus this project represent a very nice learning document both for system design and coding, even though all the code is given (but you should only use it as a way to check your work). You can find all the files here.
It´s interesting to highlight that the code for the noise of the buzzer is based upon the code of a Music Box developed using a FPGA.
Hello FPGA lovers. I am sure you are going to love today´s post: How to implement Snake Game on your FPGA. Maybe some of you are too young to remember this everlasting game that has been popular generation after generation on a wide variety of formats. And as it couldn´t be less, Snake Game deserves to be played on a FPGA.
The tutorial I am presenting today was developed by a group of students from the University of Manitoba. The project has 4 simple steps and all the hardware that you will need is your FPGA, a VGA monitor, a PS/2 keyboard, a USB cable and a power cable. Easy stuff here. Sorry for those hand-work lovers. More on that in future posts.
Well, getting back to the snake. According to the authors the more difficult parts to develop where the VGA output and the PS/2 keyboard input, as there is not too much information available on internet for its coding using Verilog. Read this, if you want to learn useful basics that will help you in future projects.
The FPGA that they used was an Altera DE2 Cyclone IV. Thus you may need to adapt the Verilog program to your FPGA. You can download the whole code here.
Another aspect I would like to highlight for you, it is their approach for coding the snake itself and what it eats, apples (funny uh). No they are not from IBM. Anyway, you may like to make your snake carnivore or a sweet lover so read these steps up and play with the code. Make your snake a dragon that eats carrots or whatever you want. This is the magic of coding.
Today´s post presents a great article for almost everybody. Whether you like real making from scratch, writing code or just working with an FPGA, keep reading.
Somehow the author was fascinated by LED digit displays at some point in his life and so he decided he had to build his own giant LED digit grid. The final design consists of 64 panels of 7-segment digits displays (8 taking into account the decimal point), a total of 4096 LEDs! These diodes are grouped by 16, each group having its own PCB with input and output headers and a LED driver/controller. Then the whole design is controlled by a Spartan 3E FPGA. This guy chose to write the animations on Processing and send them over the FPGA serial port. So you can see there are candies for every taste in this store.
Read the full article to find out that the first draft of the design did not include the use of an FPGA…In the end it did and so did the Verilog code.
The schematic and the layout are given so those who love the smell of the solder can get straight hands on. And code guys are also lucky, there is no Verilog provided and just an example of a processing sketch for displaying the first 512 digits of pi, so you can do what you love to.