Projects

I have done many projects over the years. Currently they are posted in my blog. However for you to reach it quickly I have created this page.

  • Coding for fun: Contains some codes I wrote for fun and no profit.
  • VHDL Game using Spartan 3AN: This is a project that I did for one of my courses. We were told to write a game in VHDL using Spartan 3AN. In the group it was my responsibility to write the VGA component of the system. [Click here to view related posts. ] [ Click here to download the related files. ]
  • The Black Box Project : This project is my end of year project.  It is an IP based Home Automation system over all networks. I designed an embedded system (black box if you prefer) which turns any day to day appliance into a internet capable and automated appliance. The good thing about it all settings are automated and you don’t need a static IP to reach to your appliance from over the internet. This project has ended and we published a paper on it. You can find it among the IEEE papers as : “IP Based Home Automation System” – Alkar, A.Z.;   Roach, J.;   Baysal, D.;Consumer Electronics, IEEE Transactions on November    2010 Issue:4 On page(s): 2201 – 2207 ISSN: 0098-3063
Fork me on GitHub

15 thoughts on “Projects

  1. I am new to fpga programming or in any other programing.
    can you help me with how to program Spartan 3an just to show my name in the display. Your help will be really appreciated.
    Thanks.

    • Hi there Zobaer!
      First of all please check http://johnroach.info/2011/01/15/getting-vga-output-using-vga-and-a-spartan-3an-board/
      Now the second thing you should know that you must create modules for your name.
      Each module will actually be a single character.
      For example let us assume first you will need to create the letter “o” in Zobaer;

      The letter “o” is actually a letter with small pixels. So you will need to actually create a drawing like;

      ---
      - -
      - -
      ---

      Where each “-” is actually a pixel.
      Each module will have two inputs. One is spacing… Like where in the screen will the letter o be written on.
      The second is a simple on off switch.
      So let us write John.
      First the “J” module will need to fire up and write;

      --------
      --
      --
      ------ ^
      ||
      Finished in 8 pixels


      Than quickly (by using the 25MHz clock) you will close the “J” module and get
      where the “J” module ended(8 pixels). Than call “o” module with the option of module o_letter(… ,8)
      That way the letter “o” will be create right after the “J”.
      Doing this with the rest of the letters you will eventually get

      -------- -
      -- --- - - --
      -- - - - - - - -
      ------ --- - - - -

      This will happen because J,o,h and n will be shown very quickly. And to human eyes it will look like one word.

      Couple of tips;
      – First start out with something simple like a square.
      – Than continue and empty the inside of the square
      – Realize you have made your first letter “o” :)

  2. Hi John, I’m trying to do a project for school, but I’m new on VHDL and I don’t know how to start it. Here is the requirement: Implement a VGA controller using a Nexys-2 board. You have to display 4 images(square, circle, rectangle, lines etc) and the selections will be read from the board’s buttons. You can use the reference manual of Nexys-2. If you can help me, please, I will appreciate:). Thank you!

        • Well first of all you can read through my post here… Other than that the Xilinx software is quire straight forward… Choose your hardware, write your code and connect your code through the fpga interface and there isn’t much else to it… Have you been able to understand VHDL programming?

          • Well, as I said in the first comment I’m new on VHDL. I’m trying to understand as much as I can, but I’m a little confused:). I read your post relating VGA and I’ll try to understand the code. But now I’m wondering what I should write in order to display only a dot on the screen. I think this is the easiest thing to do…but I wasn’t able to do it:-S

          • Well the thing is that you first must learn how to program in VHDL.
            Please check
            http://www.seas.upenn.edu/~ese171/vhdl/vhdl_primer.html

            And the sample code for a snake :
            https://github.com/freaktm/VHDL-Snake-Game/tree/master/vhdl

            And also check out my code in the previous link… And try to understand it… Because the code in that posts simply colors the screen red…
            Which will be a great “Hello World!” program for you. Also if you have any questions on my code please do ask!

            **** PS : Remember to connect the FPGA to your Video! Basically you need to edit your UCF file.

  3. Hi John! Me again:)). I have a question for you , if you can help me. As I told you, I have to display 4 images and the selections will be read from the board’s buttons. Should I use a RAM memory for the implementation, or I don’t need it? Are the 2 counters enough?

    • Unless you are using intense graphics you have no need of ram. You can simply use a switching mechanism. RAM is good when you have multiple dynamic data to be viewed. For example a snake game where the snake collects points and the length of the snake increases with each point.

  4. I tried to understand your code, but why did you set the value for the horizontal counter to be >=144…and the same question for the vertical one?

    37: if clk25′event and clk25 = ’1′ then

    38: if (horizontal_counter >= “0010010000″ ) — 144

    39: and (horizontal_counter = “0000100111″ ) — 39

    41: and (vertical_counter < "1000000111" ) — 519

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">