
Develop and test a seven-key FPGA module (keys zero to six) that decodes the key value and outputs key-on and key-off signals with a single always block and case statement.
Modify the key module to form key module two from solution one, update seven-bit inputs, and implement a decode task in Visual Studio Code to interpret key presses.
Audio processing is one very important subject of the FPGA application. I like to start with this “FPGA Piano” project. For this project, I specially design one FPGA daughter board. On this board, it has one buzzer, seven keys and one LED. If we press anyone of the keys, the LED will turn on and the buzzer will play one of the piano tone: do, re, mi, fa, so, la ti. If you play it according certain rhythm, you can play a simple song. In the end of the series, we demo how to play one “twinkle, twinkle, little star” song. It can be a very simple version of “electrical piano”. It is a very fun project.
For the software, it includes four main modules: buzzer module, key module, led module and top module. I type every piece of code from scratch and analyze the whole system from the whole picture in every detail. Also, I simulate every module of the system and demo how to fix the bugs in the software. You can not only learn the coding skill and also the debug technique, also you can learn how to begin one new system design from the very beginning, how to match the software interfaces with the hardware design, achieve the system requirement.