FPGA’s can be very advanced to get started using, especially if you are used to microcontrollers.
But when you first get the right feeling and the proper mindset you will soon see the endless possibilities with the programmable logic.
One of the great aspects of the logic is the speed and the full control of what happens at every single clock cycle.
With this full control it doesn’t takes many lines of code to generate a very time-critical signal such as a video signal.
In this short post I will walk thru our current test setup with an FPGA, the Spartan 3E, controlling a 18-bit 7″ 800×480 TFT display.
We have had a couple of embedded projects for our customers where the requirement were large-screen LVDS displays. By large screen I mean sizes over 7″ and a resolution of 800×480 where the common SSD1963 LCD controller can’t be used as the frame buffer RAM is too small.
LVDS Display Controller V1.0
So now we have decided to make our own similar display controller board but for LVDS displays as they are much more inexpensive and common (used in TVs and PCs). Read more…
I posted this video guide on Youtube a couple of days ago, though I wanted to announce it in here too.
In this video tutorial I guide you thru how to make a counter application for the Basys2 board, which is an FPGA board from Digilent to those who are unfamiliar with it.
I will show you the required steps of setting up a project in Xilinx ISE, writing the VHDL code for the counter application, writing the pin constraints file (.UCF) and finally generating the bit-file for the Basys2 board.
This video tutorial was actually requested by a reader of the blog, so with this being my first video tutorial, I would like to show you that comments and requests ARE HEARD!
EDIT:
The Xilinx ISE project files for the tutorial can be downloaded here: Basys2_CounterApp.zip
I posted this video on Youtube long time ago, but I forgot to write about it on my blog.
In the video I demonstrate how the Basys2 board, with a Spartan-3E 100K, can be used to generate a VGA signal.
I also show my bouncing ball application.
You can download the Xilinx project files here, including the VHDL files and User Constraint File for the Basys2 board.
The LatticeMico32 is an open source soft core processor provided by Lattice. The Lattice system makes a complete set of Verilog files, which can be ported to any FPGA. I decided to port it to the Xilinx series.
The example in the guide just blinks some LEDs, but it is not just LED blinking made with Verilog or VHDL coding, it’s made with C-coding inside an Eclipse enviroment, then compiled to the LatticeMico32. In the video above I show my first example and experience with the LM32 on the Spartan 6 FPGA.
We have been working a while with a FPGA STAMP board, to make it easier for you to start using and develop with FPGAs. Finally we have a working prototype, which you can see on the following images.
The FPGA STAMP Board includes
Spartan 3E FPGA – XC3S500E
4Mbit Xilinx Flash PROM for configuration storage
Voltage regulators and protection, as 3.3V has to be added externally
When I first recieved the board, I had already found out how to use Xilinx ISE to make schematic projects. So I made a 8-bit counter using flip-flops, AND and OR gates.
You can see the schematic here beneath:
Xilinx ISE - 8-bit Flip-Flop Counter Schematic
After a long chat with guy from HIH named Thomas (3rd semester), I got a pretty good understanding of the VHDL language and how to write to the FPGA.
So together with him I made my first project – a seven segment display decoder. It takes two 4-bit binary inputs and turns it into two HEX decimals on the seven segment display.
Afterwards I continued the project, and made a counter using the same seven segment decoder “module”. Note: A module is like any other module in regular programming language; it works by importing it, and then using it’s “functions” – though you don’t have functions with FPGA’s, but instead you have entities with processes!
Finally I made a fully working 24-hour clock with hours, minutes and seconds. You are able to set the clock by using the switches and buttons.
I’ve uploaded a video to youtube about these projects so you can see what I’ve made.
Beneath the video I’ve also uploaded the VHDL code for the 3 projects, and the seven segment module, and the UCF (pin definition) files for use with the Basys2 board, for the different projects.
Today I recieved my Digilent Basys2 FPGA board which has a Spartan-3E 100K BGA chip (XC3S100E CP132) on top.
BASYS2 Board
The Basys2 board is a simple FPGA development board, and it is easy to start with, as it has an onboard USB programmer. It has also got a 2Mbit flash for FPGA configuration storage.
The great thing with development boards though, is that you have some kind of periphirals, and on this board you have 8 switches, 8 LED’s, 4 buttons, a switchable clock (25/50/100MHz), VGA output and 4 expansion ports. This makes it alot easier to get started, because you only have to focus on the software/programming part – not the hardware.
I’ve uploaded a short video to show you the board, and the demo program which comes pre-programmed with the board!