• Home_page
  • home1

Article Index

At the advanced Vhdl course the practical was done on a ALTERA chip I used the code handed to me as a starting point
it had the basic timming for the board the project for the course was to make a clock on a vga screen here is what I
got as a starting point.

 My aim was to keep the addresing as simple as possible and use a font 8*8 only capital letters I also wanted a simple way of displaying hex values
so I the font use 0-F produce a 0-F on the display .

 


 

The  code I started out with created the following Timming when using a  25.175mhz  Pixel Clock.My board had a 50mhz.
So I divided it by two 25mhz.I adjusted the Back porch time to get the correct timing as 25mhz clock.

  

 

 


 

   1 line = 800 clocks but only the 640  are seen on the screen

  X value for char  and    Horizontal Counter

 bits 0 1 2  define the X postion in the char  now bits 3 - 7 show the  char position with a max position of 79  (4F ) hex 
 I have just split the counter as my font is (8*8) I do not need any more than splitting the counter.

 Y Values for Char   From the   Vertical  Counter

bits 0 1 2  define the Y postion in the char  now bits 3 - 7 show the  char position with a max position of 24 (18) hex 
 I have just split the counter as my font is (8*8) I do not need any more than splitting the counter.

Now Take the    Y postion      X poistion  and join them  you have how a the count  is 0 - 63   ( postion in font)

By simple looking at the counter I have created the addressing


   X value for Colum  Calculation From the   Horizontal Counter

Now all the on thr right of  Bit 3 including bit 3 make up the  Colum  postion  with a maximum on 79  over that the count is not valid.
from    0 to 79   is 80 positions    80*8 = 640   the max.

  Y value for  Row  Calculation From the  Vertical  Counter

Now all the on the right of  Bit 3 including bit 3 make up the  Row   postion  with a maximum on 24  over that the count is not valid.
0 to 24 is 25   

  I wanted to have  a display of    25 lines * 80 Colums    

 


I now create a block ram to store the data that need to be sent to the display the ram needs to be 25*80.

 Lets say I store 13h in postion  00h  

 For the    first 8 clock cycles  the   Colum Counter is 00hex  and   Row Counter  the  is also 13hex

I now moved on to make a full VGA port 25 * 80  using a 2k block ram to store the data that needed to be sent to the screen.
I kept to a very simple 8*8 font for simple addressing.The three two  lower bits address the  data and the upper three the lines

 

 

     I  output  13hex for all  the whole time I am at row 0 colum 0  I address the rom holding  
     font  with 13h  with the 6 lower bits.(postion in font)

  

 

I now take the ouput of this and send it out to a VGA monitor on RGB lines

                           

 

 


   Here is the block diagram  of what I explaned before i 

 

 

 

© 2019 All Rights Reserved. Designed By Arie Lashansky

Please publish modules in offcanvas position.