hamster

Auto display mode switching Video

Recommended Posts

I've just got a new project up on my WIki that might be of interest to Papilio Pro users. 

 

It is a VGA controller that 

 

* Accepts bursts of pixel data (so can be used with a Memory controller)

 

* Transparently  switches video clocks and timing for four video modes - 640x480, 800x600, 1024x768, 1280x720.

 

To enable the mode switching all you have to do append a '1' to the first pixel of the frame when you write it to the fifo - it handles the rest.

 

You can find it at http://hamsterworks.co.nz/mediawiki/index.php/Async_VGA

 

I've also got an example of how to program a DCM_CLKGEN at http://hamsterworks.co.nz/mediawiki/index.php/FreqSwitch

Share this post


Link to post
Share on other sites

Good one :)

 

Question: you say "it accepts bursts of pixel data". You mean that it does not drive the memory itself, but rather waits for data to come ?

 

Alvie

Share this post


Link to post
Share on other sites

Hi Alvie,

 

Yes, you guessed it. It decouples the display from the memory subsystem.

 

So the design driving has logic that works something like:

 

if pixels_left_to_read  = 0 then 

  if  the display fifo is low then

      Issue a request for another x pixels from pixel_address;

      pixels_left_to_read <= x;

      if pixel_address = 1024 * 768 - x then 

         pixel_address <= 0;

         is_first_pixel <= '1';

      else

         pixel_address <= pixel_address + x;;

      end if;

  end if;

else

   if data has been received from memory then

     write memory data to the display fifo, with is_first_pixel appended to the MSB

     pixels_left_to_read <= pixels_left_to_read-1;

     is_first_pixel <= '0';

  end if;

end if;

 

All you have to do to change the video mode is replace  "1024 * 768 - x"  with  "640 * 480 - x" (or 800x600, or 1280x720), and it takes care of switching the pixel clock from 65MHz down to 25Mhz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now