Forum Discussion

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

how to write the code to control a CRT monitor?

i am having problem on writting the code to control a CRT monitor

although i know how a CRT monitor works, but i dunno how 2 write the code for it

any suggestion?

or any soulution?

URGEnT!!

someone pls help!!!

3 Replies

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

    Do you want to support different resolutions or one fixed resolution?

    Assuming you have a RGB HS VS Monitor.

    The way it works is that you need 2 counters, one for the Vertical direction and one for the horizontal direction.

    On every output clock cycle the Horizontal counter is incremented by one.

    The vertical counter is incremented when the horizontal counter has reached the maximum line length (including syncs, back- and frontporch) and then HCOunter is resetted.

    You need then a state machine wich generates the sync signals at the correct time in the horizontal region and the statemachine has to enable the RGB Output when the HCounter and the Vcoutner are in the active pciture region. At the end of the last line you need to reset both counter HCounter and Vcoutner. Thats it in short.

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

    --- Quote Start ---

    Do you want to support different resolutions or one fixed resolution?

    Assuming you have a RGB HS VS Monitor.

    The way it works is that you need 2 counters, one for the Vertical direction and one for the horizontal direction.

    On every output clock cycle the Horizontal counter is incremented by one.

    The vertical counter is incremented when the horizontal counter has reached the maximum line length (including syncs, back- and frontporch) and then HCOunter is resetted.

    You need then a state machine wich generates the sync signals at the correct time in the horizontal region and the statemachine has to enable the RGB Output when the HCounter and the Vcoutner are in the active pciture region. At the end of the last line you need to reset both counter HCounter and Vcoutner. Thats it in short.

    Regards Christian

    --- Quote End ---

    icic, but i still not so understand..

    the 2 counters u mean is the external chip?? or i jz need 2 write it in the QuartusII??