oliverde

how does FRQA really works with Video drivers?

Rate this Entry
Hello all.
I am trying to do my own video driveer for VGA. I read all datasheets, propeller manual, I already saw other drivers but looks like nobody does what the datasheet says...
this is what I am doing right now. I tryed to do a simple program to make one single line of video first, so there is no monitor connected, no vertical signal yet, just an oscilloscope to see the times and figure how and where do the other's drivers got their weird numbers for FRQA, VSCL, PIXELS and COLORS and , so I first setup the video generator in two color mode and other registrs like this:
_FRQA = 40000000;
_CTRA = 0b00001 <<26 | 0b101 <<23;
/******Config VIDEO*******/
_VCFG = 0b01 <<29 | 0b0 <<28 | 0b010 <<9 | 0xFF ;
_VSCL = 1<<12 | 32;
while (1)
{
//Hsync and back porch
__builtin_propeller_waitvid( 0x00000200, 0xfc1fffff);
//display pixels
for(i = 0; i < 16; i++)
{
__builtin_propeller_waitvid( 0x0000c202, 0xaaaaaaaa);
}
}

You can see the behavior of this small portion of code in the attached image, so I was very happy since it is too simple to make a video driver, I started to "calibrate" the times by changing the FRQA to adjust my line of video to comply the VGA standars and there is what I got.
Click image for larger version

Name:	Hsync and video with FRQA 40000000.jpg
Views:	17
Size:	126.4 KB
ID:	105900

I have seen other drivers which works perfectly with FRQA adjusted to _FRQA = 0x1C000000; so I changed in the code above for this value and the signals gone with a mess in the whole port, see the attached image...
Click image for larger version

Name:	Hsync and video with FRQA 0x1C000000.jpg
Views:	15
Size:	130.0 KB
ID:	105901


I want to ask what happens there? I was incrementing this FRQA litle by litle and the times of my Hsync and pixels signals get narrower as expected but sudenly it stops to do the proper behavior, so I cannot get how the other driver came with this value??

Can somebody help me?

Submit "how does FRQA really works with Video drivers?" to Digg Submit "how does FRQA really works with Video drivers?" to del.icio.us Submit "how does FRQA really works with Video drivers?" to StumbleUpon Submit "how does FRQA really works with Video drivers?" to Google

Categories
Propeller , ‎ Programming , ‎ Art and Display

Comments

  1. davejames's Avatar
    Hello oliverde,

    I would suggest posting this request in the Propeller forum as not all Forum members frequent the blogs.
  2. ericball's Avatar
    Typically video drivers use CTRA in the PLL internal mode. The PLL has a pull-in frequency of 4-8MHz. So you first take your desired output frequency (typically either the 16x the colorburst frequency for TV or a multiple of the pixel frequency for VGA) and then scaling it by a factor of 2 to get your desired frequency. (i.e. NTSC uses 16 * 3,579,545 Hz = 57,272,727 Hz = 8 * 7,159,091 Hz) Then you divide the clock frequency (e.g. 80MHz) by the desired PLL input frequency (e.g. 7,159,091 Hz) to get the FRQA value.

    VSCL further divides the PLLA frequency to a number of PLLA clocks per pixel and per frame (WAITVID).