Archive for September, 2010

First projects with FPGA

September 14th, 2010 51 comments

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.

I’ve uploaded a zip file containing the VHDL code for the 3 Seven segment projects and UCF files for use with the Basys2 board.
You can grab the zip file here!

A new “easier to use” Seven Segment module can now be downloaded here:

Categories: FPGA Tags:

Visit on Aarhus University in Herning (HIH)

September 10th, 2010 No comments

I haven’t made any posts in a long time, and that’s because of school, homework and work.
But yesterday and today I have time off from school, so I thought it would be nice to follow a first semester class on Aarhus University in Herning; read more about AU-HIH here

I contacted one of the counselors there, Thomas, who was a very friendly man, and was fast to arrange this meeting. So yesterday I took the train from Holstebro to Birk Centerpark and walked with all the students to the school – pretty nice feeling to be “one of them”.
At the school I found the class I was supposed to follow this day, and found me a place to sit. All the teaching are done in English, so I looked forward to see how that would go.
The first two lessons was called “Basic Software Development”, and we worked with Eclipse and C++, where we made some functions, if-statements and for loops. Remember, this is only a first semester class – they will get more advanced over time!

The second two lessons to follow was called “Digital Design”, and I really liked those lessons. We learned about decimal to binary conversion, decimal to octal, decimal to hex and opposite – of course the mathematical way. Then we also learned to to add and substract in binary!
That was 4 hours, and then I had my lunch and went to the electronics lab as the class were going to experiment with AND, NOR and NAND gates on their breadboard. This was a great task, and I got to help some of the students too 🙂
As the last lesson this day, we was introduced to OrCAD, and how simulation works. We tried putting a schematic together with 4 resistors, and then OrCAD simulated the different voltages and power comsumption.

That was the day for the students, but not for me! I was going to meet Thomas, the EDE Counselor (EDE meens Electronics Design Engineer), and have a chat about the study enviroment, the lessons, and how it all works. But not least have a talk about FPGA’s and VHDL.
We sat in Electronics LAB from about 3PM till 10PM, chatting, discussing and playing with FPGA’s. I learned a lot, especially the VHDL language, which is used to program the FPGA chips.
I made a project with the 4 seven segments on my Basys2 board, so I could show numbers on that – but I’ll talk about that in another post in here.
So to end this day we drove to Mac Donals to have meal, and then I took the train back to Holstebro.

It was a very nice and interesting day, and I thanks the class, the teachers and Thomas, for letting me try this. I’m looking forward to join you all the time in a couple of years!
Thank you…


Categories: TKJ Electronics Tags:

Digilent Basys2 FPGA Board

September 10th, 2010 No comments

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!

Categories: Development boards, FPGA Tags: