Forum Discussion
Altera_Forum
Honored Contributor
13 years agoHello,
Sorry for the previous messages. I'm working with an HW191 and I'd like to use it with my FPGA with an external clock of 50Mhz. Here is the part of the datasheet of the screen : http://upload.dinhosting.fr/H/C/W/tab.png I intended to use the VESA 800*600 72Hz for my screen so I'll use this setting : http://tinyvga.com/vga-timing/800x600@72hz (http://tinyvga.com/vga-timing/800x600@72hz) Could you confirm or correct my code to run the screen in VESA mode ? library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY vesa IS PORT ( pixel_clock_in : IN STD_LOGIC; VGA_HS: OUT STD_LOGIC; VGA_VS: OUT STD_LOGIC; VGA_Re : OUT STD_LOGIC; VGA_Gr : OUT STD_LOGIC; VGA_Bl : OUT STD_LOGIC ); END vesa; ARCHITECTURE Arch OF vesa IS SIGNAL H_count: STD_LOGIC_VECTOR (9 DOWNTO 0); SIGNAL V_count: STD_LOGIC_VECTOR (9 DOWNTO 0); SIGNAL Video_ON : STD_LOGIC; SIGNAL Video_H : STD_LOGIC; SIGNAL Video_V : STD_LOGIC; SIGNAL H_SYNCH,V_SYNCH : STD_LOGIC; BEGIN Video_ON<=(Video_H AND Video_V); VGA_HS<=H_SYNCH; VGA_VS<=V_SYNCH; PROCESS BEGIN WAIT UNTIL(RISING_EDGE(pixel_clock_in)); IF H_count>1040 THEN H_count<=(OTHERS=>'0'); ELSE H_count<=H_count+'1'; END IF; IF (H_count<57) THEN H_SYNCH<='0'; ELSE H_SYNCH<='1'; END IF; IF H_COUNT>=176 AND H_COUNT<=976 THEN Video_H<='1'; ELSE Video_H<='0'; END IF; IF (V_count>666 AND H_count>=1040) THEN V_count<=(OTHERS=>'0'); ELSIF H_count>=1040 THEN V_count<=V_count+'1'; END IF; IF (V_count<38) THEN V_SYNCH<='0'; ELSE V_SYNCH<='1'; END IF; IF V_count>=43 AND V_count<=643 THEN Video_V<='1'; ELSE Video_V<='0'; END IF; IF Video_ON='1' THEN VGA_Re<='1' ; VGA_Gr<='1'; VGA_Bl<='1'; END IF; IF Video_ON='0' THEN VGA_Re<='0'; VGA_Gr<='0'; VGA_Bl<='0'; END IF; END PROCESS; END arch; Thanks for your help. Yougo.