Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

problem with VGA display of a static image

Hello ALL

please i've a question concerning the display of an image on VGA using FPGA

i have the DE2 Board with cyclone II FPGA chip

i created a quartus project,i've a VGA Controller that is working correctly. ALL i want is to display an image that i stored in a ROM as .mif file on the VGA.

i tried this but it didn't work. i added a dual ram but i didn't know how to wire all the signals to send data to the vga data_in

shall i use a dual ram ?

knowing that the VGA requires a frequency of 25MHZ, what is the required frequency of the ROM and the Dual ram blocks ?

thank you so much for your time and consideration

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Please i need some help

    i tried to debug the project and i think the problem is between the rom where i saved the .mif and the dual ram

    thank you
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    How do you know that your VGA controller works properly? Do you see most of the image? What are the clock rates on the VGA controller's input interface? The clock rate on your ROM/RAM blocks?

    Without more indications of your problem and your current configuration, I don't know exactly where to begin. You might try posting a code segment where you think the problem is, but I can't guarantee that will give anyone enough information to help you solve your problem.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank u Kosh271 for ur reply

    to test the VGA controlleur i connected the data input to switches from the DE2 an i supplied it with 25MHZ

    it's as if i'm sending the same pixel information , the display changes when i change the code on the switches

    the clock rate of the VGA is 25MHZ

    the ROM block is at 50Mz

    the Dual RAM , write clock 50MHz , the read clock 25MHZ

    thank u so much
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It does sound like the pixel data is arriving at the VGA output ok. There are a few things that I can think of that may be going wrong.

    1. The ROM has an old .mif file stored in the Quartus db folder. You can either select "Update memory initialization files" from the processing menu or delete the db folder.

    2. The ROM .mif has an incorrectly formatted image. (colors can be wrong, picture resolution may be different) Try writing a basic process that outputs a black screen for half of the image and a white screen for the other half. (do this twice - top/bottom and left/right) This will ensure that you are outputting the video format you expect. (if your image rolls or isn't half of your display, your assumptions on the horizontal and vertical sizes are probably off)

    The dual port ram should work if your addressing is good. It is one way to cross the clock domain from 50MHz to 25MHz. That's about as much help as I can give you for now. Try (1) first. It is easier and faster to test than (2). Good luck!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank u sooooooo much for ur reply kosh271

    i'm very grateful to u. I succeeded today in displaying a static image on the VGA screen

    i eliminated the dual ram module and adjusted the addressing . there was a problem with that a mismatch and bad synchronisation between data sent to the VGA controller and the way it was represented on the screen

    Thank u again for ur help