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


I've also got an example of how to program a DCM_CLKGEN at

Link to comment
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';


         pixel_address <= pixel_address + x;;

      end if;

  end if;


   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

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.