Re: OV7620 image sensor interface with FPGA headache

From: Paul Carpenter (paul$_at_pcserv.demon.co.uk)
Date: 11/20/04


Date: Fri, 19 Nov 2004 23:09:54 +0000 (GMT)

On Friday, in article
     <eb85bd6eab936116056f3a4830038d87@localhost.talkaboutelectronicequipment.com>
     dwmunandar@yahoo.com "dalle002" wrote:

>Dear helpers,
>
>Your inputs were awesome. I made sure the I2C was enabled, put a 4k7
>pullup resistor and make sure the timing specifications are met and BAM!
>it works! I got the acknowledge signals and the PCLK frequency has doubled
>to 27MHZ. I was jumping up and down for a while in gladness. Thank you all
>for your help. Probably my biggest mistake is the 300k resistor I used.

Glad to see you have made progress...

>Now I still need further help on sending the image to the VGA monitor. Did
>anyone has succesfully send the digital image directly to a monitor
>without any need of storing the image in a memory?

I think you will find that difficult, because the first paragraph of the
data sheet I have states

        "The devices incorporate a 640 x 480 image array capable
         of operating at up to 30 frames per second."

So it is NOT possible to get VGA resolution continuously at 60fps.
INTERLACED at 60fps (NTSC timings) should be possible.

QVGA at 60fps is possible.

>I tried to store the pixel information in registers that is output to the
>color signals to the monitor. I noticed with progressive 16-bit mode, the
>UV channel output G and R values in sequence, and the Y channel output B
>and G values.

That is because the device only has 2 A/Ds and that is primarily meant
for still images or QVGA 'movies' as progrssive scan in digital format
to be processed externally. It is NOT meant as a standard video camera.
This is one of the standard modes which you will have to control by the
I2C to change to any other format.

> I noticed that the register go some values but if I use the
>VSYNC and HREF signal from the camera sent directly to the monitor,
>nothing showed up.

Because you have data and timing for basically still image capture, not
as a continuous progressive scan video camera. You will need a video
(not PC graphics) monitor to display an interlaced mode image.

>I also use the FPGA to count numbers of HSYNC in a frame. The FPGA counted
>about 424 HREF signals plus minus 10 more. I'm wondering how come the
>number is not consistent? And why is it not close to 492 (I'm expecting
>492 lines for VGA output).
>
>I'm wondering if this is because the sampling clock my FPGA use (50MHz) is
>not sufficient to sample the pixel information (13MHz) for progressive,
>RGB, 16-bit mode? Would anyone recommend taking out the camera's
>oscillator, connect the JP1 jumper and give the camera and external clock
>from the FPGA?

Clocking from the FPGA is an option but understand the timing and max
clock of 30MHz that must drive the camera, perhaps sort timings for
25MHz clock to camera. Your discrepancies depend on how you are clocking
the count and saving results and reading the results. Are you clearing
the count during vertical and missing the HSYNCs during vertical sync
or worse still during vertical blanking.

>I also noticed a discrepancy in the camera's data sheets. It says that if
>it were to be set as a slave with an external clock provided, the VSYNC
>signal must be provided to the camera. The VSYNC signal must follow the
>formula: 525*2*858*Tclk - which will only give about 30Hz/fps for an 25MHz
>clock input? I need a 60Hz output for the monitor. Currently with the
>camera's original oscillator, I observed 60Hz VSYNC signal given by the
>camera. Why the disagreement?

Understand the differences between frames and fields, in relation to
progressive and interlaced scan.

   Interlaced scan gives 30 FRAMES per second consisting of
                                60 FIELDS, hence 60Hz VSYNC.

   Progressive scan gives 30 FRAMES per second hence 30Hz VSYNC

The data sheet is badly written (appears to have been translated via
10 languages and back again) and has a few typos in it.

>Can anyone offer me any help on these questions? Any amount of input will
>be appreciated.
>
>Thanks ahead.

-- 
Paul Carpenter          | paul@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/>    PC Services
<http://www.gnuh8.org.uk/>              GNU H8 & mailing list info
<http://www.badweb.org.uk/>             For those web sites you hate


Relevant Pages

  • Re: Now on 8.2.03i Re: Xilinx ISE ver 8.2.02i is optimizing away and removing "redundant" logic -
    ... "input setup/hold time" is the time required before a clock edge to ... Setup time is the time for the signal to be stable prior to ... live in isolation it is connected to outside devices that may have timing ... the calling module and in the signals used in the submodule. ...
    (comp.arch.fpga)
  • Re: Timing violation when initializing "some" FSMs and not others
    ... the clock. ... signals through at least one FF, or if your delays are a significant ... This is not likely to find all or even most timing errors ... Because either there are no timing constraints to check or some ...
    (comp.arch.fpga)
  • Re: Post-map simulation: timing violation and delays
    ... up confused in the "things happening in the next clock cycle" thing. ... on different signals in the same process). ... Then I got to the inverter thing, removed some of the timing violations ... I've tried putting in some timing constraints, ...
    (comp.arch.fpga)
  • Re: Camera connection on XUPV2P
    ... speed expansion port of the XUPV2P to the outputs of the National Chip ... signals, and data-valid signals from the chips. ... clock signals, and then sampled again using the Bus2IP clock. ... I'm not sure what you mean by sampling the camera data according ...
    (comp.arch.fpga)
  • Re: Camera Link i/f spec - signal requirements on FVAl/LVAL/DVAL
    ... It gets more complex than that depending on the camera. ... I find it is safest to use as a clock enable ... DVAL and SPARE signals in this mode, ... Allow several clock cycles from assertion of FVAL to ...
    (comp.arch.fpga)