Controll VGA with encoder.

Discussion in 'Embedded Systems and Microcontrollers' started by Rosi, Dec 14, 2009.

  1. Rosi

    Thread Starter New Member

    Dec 14, 2009
    3
    0
    Greetings all.

    This is my first post in the forum and I do not know even if I have posted in the correct place.

    I start doing a small project with a FPGA and VHDL I searched around found couple of solutions but I am not happy about them.

    So here I am asking the question to experts :)

    I have to make the pong game. Old classic one. I was asked to make the side bars move up and down (two of them) using encoders.

    So I need to create the bars first and then to control them with encoders.

    Until now my solution was that I create a circlet the two encoders they are connected to the pins 18-17 and 16-15 of a FPGA. I used the input of them as feedback but it didn't really work. I had to format my computer either case so I said that I can start a new with better solution.

    If you know any good tutorial or link or book something that can help me out, please advance :)

    Thank you
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. Rosi

    Thread Starter New Member

    Dec 14, 2009
    3
    0
    Thanks for your answer.

    Well it was kinda weird way to start the project. It is a Univ project so hardware is not an issue. I asked the professor and he gave me encoders. rotary encoders 265-1723. I was kinda happy to see that I asked for the correct ones (even before reading your answer).

    I even manage to put some code in the VHDL. I can share if you want to and try to improve it.

    I still have some troubles to figure out how to insert the value from the encoder in a registry.
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Use it as a count that translates to absolute position. Use the quadrature outputs to determine if the count goes up or down.
     
  5. Rosi

    Thread Starter New Member

    Dec 14, 2009
    3
    0
    Hello again :)

    Once again, first do it and then read your answer :)

    But either case it is working so I am happy. I will keep asking question if I come up with something that I can not figure out (which would most likely mean that I simple need to spend a bit more time on it)

    In any case thanks for your feedback so far :)

    Rosi
     
Loading...