A
Amit
Hello group,
I'm looking at a source code which generates a vsync and hsync signal
for VGA (640x480 pixel by pixel) and in there I see there is a
checking if v_count and h_count condition is checked as follow:
For horizontal and then vertical:
--Generate horizontal and vertical timing signals for video signla
--H_count counts pixels (640 + extra time for sync signals)
if (h_count = 799 ) Then
h_count <= "0000000000";
else
h_count <= h_count + 1;
end if;
if (v_count <= 755) AND (h_count =>659 ) Then
horiz_sync <= '0';
else
horiz_sync <= '1';
end if;
if (v_count >= 524) AND (h_count =>699 ) Then
v_count <= "0000000000";
elsif
v_count <= v_count + 1;
end if;
Questions:
Why does it check for 799 when the resolution is 640?
if it is extra time how is it calculated then?!
same for the vertical? how should I know what number should I use in
condition part?
Thanks,
Amit
I'm looking at a source code which generates a vsync and hsync signal
for VGA (640x480 pixel by pixel) and in there I see there is a
checking if v_count and h_count condition is checked as follow:
For horizontal and then vertical:
--Generate horizontal and vertical timing signals for video signla
--H_count counts pixels (640 + extra time for sync signals)
if (h_count = 799 ) Then
h_count <= "0000000000";
else
h_count <= h_count + 1;
end if;
if (v_count <= 755) AND (h_count =>659 ) Then
horiz_sync <= '0';
else
horiz_sync <= '1';
end if;
if (v_count >= 524) AND (h_count =>699 ) Then
v_count <= "0000000000";
elsif
v_count <= v_count + 1;
end if;
Questions:
Why does it check for 799 when the resolution is 640?
if it is extra time how is it calculated then?!
same for the vertical? how should I know what number should I use in
condition part?
Thanks,
Amit