I have already achieved 160x120 image, but whole image is quite "yellow" (i will place video here but tomorrow, when ill get better light from sun rather than bulb). Also i had to change some registers, IMO Hamster made few mistakes:
- check register 0x3E with value 0x19 - PCLK scaling comment says that PCLK = 4, its not true, PCLK is 2 with this setup (check datasheet);
- register 0x73 is set to value 0xF1 - ive changed it to 0x01 (4 oldest bits are reserved and initially set to 0) - he set lowest set bit correctly for PCLK = 2;
- register 0xA2 is set to value 0x02 - ive changed it to 0x01 (0x02 stands for PCLK divided by 4 - checked with oscilloscope);
- also commented all other registers setup from 0xA2 (when x"14"-...-x"36") - better quality in my opinion
Two funny things:
- cant find information about register 0xA2 in datasheet (9F-AB Histogram-based AEC/AGC ControlXX–Histogram-based AEC/AGC Control);
- Hamster I2C reset command seems not working - i mean when i reprogram fpga when it has already some VHDL description in it camera bahaves different than if i upload VHDL design after powering up the de0 nano device - this may be cause of all of my problems (with colors in example and the image quality is quite bad), thats why i wanted to use uC for I2C setup.
As i've said, ill upload video of my results tomoroww and also i can upload project if You want, but ill be working on interfacing design with SDRAM to get better resolution and quality anyway .
1 more thing - im using 5 bit DAC for each color, so im setting 3 oldest R, 3 oldest G and 2 oldest B (same 8bit setup from hamsterworks) - rest of bits are set to "0":
vga_red <= frame_pixel(7 downto 5) & "00";
vga_green <= frame_pixel(4 downto 2) & "00";
vga_blue <= frame_pixel(1 downto 0) & "000";
edit
and here's video showing results of above operations
[video=youtube;F1W-AwpiE1M]
https://www.youtube.com/watch?v=F1W-AwpiE1M[/video] About visible colorful noise - i think its wire's fault, it behaves better when i hold cables connecting ov7670 (PCLK = 12,5 MHz) or when i use lower PCLK (PCLK = 4 -> PCLK = 6,25 MHz) - in the other situation i receive like 4 frames divided on LCD showing same scenario with some shift - im thinking about changing some clocks in design mayby it will help, anyway my goal now as i mentioned many times is to get better resolution by adding SDRAM (also better colors). Im suprised that quality of shown video is bad if it is about colors, i mean RGB 3-3-2 gives about 2^3*2^3*2^2 = 256 color combinations and presented images are very monochrome (depending of light).