Altera_Forum
Honored Contributor
10 years agoVGA monitor display
Hi guys.
I am having problem about my VGA monitor. I already have output on my VGA monitor. But now I am confuse about the output. See my attachment for the output. Here is my coding for the VGA monitor for last part. I want to display color based on my rom. If the content in rom is "128"(decimal), it will display WHITE color on VGA monitor else black color. But now the output seems have something wrong. Sorry for my bad explaination. Anybody who got idea abot my problem. Thanks for your attention. LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY hw_image_generator IS GENERIC( pixels_y : INTEGER := 600; --row that first color will persist until pixels_x : INTEGER := 600); --column that first color will persist until PORT( disp_ena : IN STD_LOGIC; --display enable ('1' = display time, '0' = blanking time) column : IN INTEGER; --column pixel coordinate row : IN INTEGER; --row pixel coordinate red : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); --red magnitude output to DAC green : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); --green magnitude output to DAC blue : OUT STD_LOGIC_VECTOR(7 DOWNTO 0) := (OTHERS => '0'); --blue magnitude output to DAC Q : in std_logic_vector (7 downto 0)); END hw_image_generator; ARCHITECTURE behavior OF hw_image_generator IS begin PROCESS(disp_ena, row, column) BEGIN IF(disp_ena = '1') THEN IF(row < pixels_y AND column < pixels_x) THEN IF (Q = "10000000") THEN red <= (OTHERS => '1');----white green <= (OTHERS => '1') ;---white blue <= (OTHERS => '1');---white ELSE red <= (OTHERS => '0'); green <= (OTHERS => '0') ; blue <= (OTHERS => '0'); END IF; ELSE red <= (OTHERS => '0'); green <= (OTHERS => '0'); blue <= (OTHERS => '0'); END IF; ELSE red <= (OTHERS => '0'); green <= (OTHERS => '0'); blue <= (OTHERS => '0'); END IF; END PROCESS; END behavior; -------