Reply by bish October 22, 20082008-10-22
On Oct 21, 2:28=A0pm, Paul Carpenter <p...@pcserviceselectronics.co.uk>
wrote:
> In article <991ea2b7-c2d6-48d0-9301- > 698a466dc...@g61g2000hsf.googlegroups.com>, bishes...@gmail.com says... > > > On Oct 20, 3:47=A0am, Paul Carpenter <p...@pcserviceselectronics.co.uk> > > wrote: > > > In article <87dab7be-5ffd-4cd2-a260- > > > 2d2afed3f...@t18g2000prt.googlegroups.com>, bishes...@gmail.com says.=
..
> > > > > Hi everyone, I want to buyc3038camera module that uses omnivision's > > > > ov6630 image sensor. > > > > I'm trying to make an interface for this camera in fpga to grab the > > > > frame. > > > > To have the complete control over the incoming data, I thought of > > > > using camera in slave mode...... > > .... > > > > > > > > > ii) the timing diagram for ZV port standard shows that href signal =
is
> > > > asserted for new line only when hsync signal goes low after being h=
igh
> > > > for sometime indicating start of the frame. However, hsync signal w=
e
> > > > need to provide in slave mode is supposed to be high when vsync sig=
nal
> > > > is still high (as shown in slave mode operation timing diagram.) > > > > I'm confused about the hsync and href signal for slave mode. > > > > If you cannot drive the module in slave mode, don't bother with > > > slave mode timings. > > > > Just remember that in slave mode you will have to generate timing > > > patterns to send to the camera device based on counters for pixels, > > > lines, fields and memory addressing. > > > > Whilst in master mdoe you trigger these counters from start of > > > field/frame to acquire the data. > > > In master mode I haven't yet figured out if I can tell camera just > > when to send new frame and when to stop. I don't know if I overlooked > > the datasheet but I didn't see it there!! > > In master mode the camera is master, you cannot tell it when to start > you wait for frame start point. > > > > > I'm trying to design at least for now for master mode but then this > > > > will require my interface to wait for the new frame to start when i=
t
> > > > needs a frame. I don't know as for now how this can affect the syst=
em
> > > > which consists of detecting =A0some object based on the data from t=
he
> > > > camera. > > > > So you wait for VSYNC and HREF combination for odd or even field to > > > denote start of frame acquire frame, via FPGA. Alternatively you coul=
d
> > > just acquire one field. Depending on how you have configured the > > > camera device. > > > I'll be using the progressive scan mode. I don't know if I am > > understanding right but for this mode I think I need to simply wait > > for the href signal to go high after the falling edge of vsync > > signal. > > Look at the data sheet for that mode. Their datasheets are not great > but they are better than most, and assume some understanding about > digital vidoe streams. >
> > I just completed the interface in FPGA. This module will start its > > operation when start_capture (which is its input) is asserted. After > > start_capture it will wait for new valid frame to start assuming > > camera has been sending pixel data continuosly (this of course would > > require some setting of registers through I2c which will be done by > > another module in fpga). After the vsync pulse it will get data for > > this frame. So if the camera had just started to send new frame when > > start_capture is asserted then this module has to wait for almost > > complete frame before next frame starts. > > > Is my analysis correct? I haven't just yet bought the camera, so > > haven't got chance to actually check with hardware. > > In a very general sense yes that is right. Specifics depend on a > lot more than that. > > --
I have just checked my module with the testbench I designed to generate the video signals just like the camera would. And it worked perfectly in modelsim during simulation. This has not yet included setting of the registers in the camera but I don't think that will be a problem. So I'll get the hardware and then check it out. Thanks for the replies Paul and once again sorry for the accidental postage of this same question in another thread which I've clarified in that thread.
> Paul Carpenter =A0 =A0 =A0 =A0 =A0| p...@pcserviceselectronics.co.uk > <http://www.pcserviceselectronics.co.uk/> =A0 =A0PC Services > <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font > <http://www.gnuh8.org.uk/> =A0GNU H8 - compiler & Renesas H8/H8S/H8 Tiny > <http://www.badweb.org.uk/> For those web sites you hate- Hide quoted tex=
t -
> > - Show quoted text -
Reply by Paul Carpenter October 21, 20082008-10-21
In article <991ea2b7-c2d6-48d0-9301-
698a466dccce@g61g2000hsf.googlegroups.com>, bisheshkh@gmail.com says...
> On Oct 20, 3:47=A0am, Paul Carpenter <p...@pcserviceselectronics.co.uk> > wrote: > > In article <87dab7be-5ffd-4cd2-a260- > > 2d2afed3f...@t18g2000prt.googlegroups.com>, bishes...@gmail.com says... > > > > > Hi everyone, I want to buy c3038 camera module that uses omnivision's > > > ov6630 image sensor. > > > I'm trying to make an interface for this camera in fpga to grab the > > > frame. > > > To have the complete control over the incoming data, I thought of > > > using camera in slave mode......
....
> > > ii) the timing diagram for ZV port standard shows that href signal is > > > asserted for new line only when hsync signal goes low after being hig=
h
> > > for sometime indicating start of the frame. However, hsync signal we > > > need to provide in slave mode is supposed to be high when vsync signa=
l
> > > is still high (as shown in slave mode operation timing diagram.) > > > I'm confused about the hsync and href signal for slave mode. > > > > If you cannot drive the module in slave mode, don't bother with > > slave mode timings. > > > > Just remember that in slave mode you will have to generate timing > > patterns to send to the camera device based on counters for pixels, > > lines, fields and memory addressing. > > > > Whilst in master mdoe you trigger these counters from start of > > field/frame to acquire the data. >=20 > In master mode I haven't yet figured out if I can tell camera just > when to send new frame and when to stop. I don't know if I overlooked > the datasheet but I didn't see it there!!
In master mode the camera is master, you cannot tell it when to start you wait for frame start point.
> > > I'm trying to design at least for now for master mode but then this > > > will require my interface to wait for the new frame to start when it > > > needs a frame. I don't know as for now how this can affect the system > > > which consists of detecting =A0some object based on the data from the > > > camera. > > > > So you wait for VSYNC and HREF combination for odd or even field to > > denote start of frame acquire frame, via FPGA. Alternatively you could > > just acquire one field. Depending on how you have configured the > > camera device. >=20 > I'll be using the progressive scan mode. I don't know if I am > understanding right but for this mode I think I need to simply wait > for the href signal to go high after the falling edge of vsync > signal.
Look at the data sheet for that mode. Their datasheets are not great but they are better than most, and assume some understanding about digital vidoe streams.
> I just completed the interface in FPGA. This module will start its > operation when start_capture (which is its input) is asserted. After > start_capture it will wait for new valid frame to start assuming > camera has been sending pixel data continuosly (this of course would > require some setting of registers through I2c which will be done by > another module in fpga). After the vsync pulse it will get data for > this frame. So if the camera had just started to send new frame when > start_capture is asserted then this module has to wait for almost > complete frame before next frame starts. >=20 > Is my analysis correct? I haven't just yet bought the camera, so > haven't got chance to actually check with hardware.
In a very general sense yes that is right. Specifics depend on a=20 lot more than that. --=20 Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
Reply by bish October 20, 20082008-10-20
On Oct 20, 3:47=A0am, Paul Carpenter <p...@pcserviceselectronics.co.uk>
wrote:
> In article <87dab7be-5ffd-4cd2-a260- > 2d2afed3f...@t18g2000prt.googlegroups.com>, bishes...@gmail.com says... > > > Hi everyone, I want to buy c3038 camera module that uses omnivision's > > ov6630 image sensor. > > I'm trying to make an interface for this camera in fpga to grab the > > frame. > > To have the complete control over the incoming data, I thought of > > using camera in slave mode. But there seems to be two problem with > > that: > > > i) The ov6630 datasheet says that 'hsync' signal from master should be > > connected to chsync/bw (pin 42) pin in sensor. But seeing datasheet of > > c3038 it does not seem to have made this pin available to be used. > > So they have made a master device only. > > > ii) the timing diagram for ZV port standard shows that href signal is > > asserted for new line only when hsync signal goes low after being high > > for sometime indicating start of the frame. However, hsync signal we > > need to provide in slave mode is supposed to be high when vsync signal > > is still high (as shown in slave mode operation timing diagram.) > > I'm confused about the hsync and href signal for slave mode. > > If you cannot drive the module in slave mode, don't bother with > slave mode timings. > > Just remember that in slave mode you will have to generate timing > patterns to send to the camera device based on counters for pixels, > lines, fields and memory addressing. > > Whilst in master mdoe you trigger these counters from start of > field/frame to acquire the data.
In master mode I haven't yet figured out if I can tell camera just when to send new frame and when to stop. I don't know if I overlooked the datasheet but I didn't see it there!!
> > > I'm trying to design at least for now for master mode but then this > > will require my interface to wait for the new frame to start when it > > needs a frame. I don't know as for now how this can affect the system > > which consists of detecting =A0some object based on the data from the > > camera. > > So you wait for VSYNC and HREF combination for odd or even field to > denote start of frame acquire frame, via FPGA. Alternatively you could > just acquire one field. Depending on how you have configured the > camera device.
I'll be using the progressive scan mode. I don't know if I am understanding right but for this mode I think I need to simply wait for the href signal to go high after the falling edge of vsync signal. I just completed the interface in FPGA. This module will start its operation when start_capture (which is its input) is asserted. After start_capture it will wait for new valid frame to start assuming camera has been sending pixel data continuosly (this of course would require some setting of registers through I2c which will be done by another module in fpga). After the vsync pulse it will get data for this frame. So if the camera had just started to send new frame when start_capture is asserted then this module has to wait for almost complete frame before next frame starts. Is my analysis correct? I haven't just yet bought the camera, so haven't got chance to actually check with hardware.
> > If your processing is really simple process the data as you are > acquiring the data. In reality, you are more likely to acquire > the data and store it in local memory for processing.
If the processing will take too long time to catch up with the frames coming then of course I'm thinking of using external ram which is plenty (128MB) in my board. Well FIFO within the fpga with size of some fraction of total frame size could be a help for simple processing tasks. But I haven't reached there yet.
> > This way you can acquire one image, whilst processing the > previous image. Alternatively you only acquire frames > when the processing is finished or nearly finished. > > > so guys who have worked with cmos cameras, I think I'll have enough > > help to solve this issue soon. > > thanks. > > Last time I worked with Omnivision cameras it was with the actual > devices on our own board. > > -- > Paul Carpenter =A0 =A0 =A0 =A0 =A0| p...@pcserviceselectronics.co.uk > <http://www.pcserviceselectronics.co.uk/> =A0 =A0PC Services > <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font > <http://www.gnuh8.org.uk/> =A0GNU H8 - compiler & Renesas H8/H8S/H8 Tiny > <http://www.badweb.org.uk/> For those web sites you hate
Reply by Paul Carpenter October 19, 20082008-10-19
In article <87dab7be-5ffd-4cd2-a260-
2d2afed3f31e@t18g2000prt.googlegroups.com>, bisheshkh@gmail.com says...
> Hi everyone, I want to buy c3038 camera module that uses omnivision's > ov6630 image sensor. > I'm trying to make an interface for this camera in fpga to grab the > frame. > To have the complete control over the incoming data, I thought of > using camera in slave mode. But there seems to be two problem with > that: > > i) The ov6630 datasheet says that 'hsync' signal from master should be > connected to chsync/bw (pin 42) pin in sensor. But seeing datasheet of > c3038 it does not seem to have made this pin available to be used.
So they have made a master device only.
> ii) the timing diagram for ZV port standard shows that href signal is > asserted for new line only when hsync signal goes low after being high > for sometime indicating start of the frame. However, hsync signal we > need to provide in slave mode is supposed to be high when vsync signal > is still high (as shown in slave mode operation timing diagram.) > I'm confused about the hsync and href signal for slave mode.
If you cannot drive the module in slave mode, don't bother with slave mode timings. Just remember that in slave mode you will have to generate timing patterns to send to the camera device based on counters for pixels, lines, fields and memory addressing. Whilst in master mdoe you trigger these counters from start of field/frame to acquire the data.
> I'm trying to design at least for now for master mode but then this > will require my interface to wait for the new frame to start when it > needs a frame. I don't know as for now how this can affect the system > which consists of detecting some object based on the data from the > camera.
So you wait for VSYNC and HREF combination for odd or even field to denote start of frame acquire frame, via FPGA. Alternatively you could just acquire one field. Depending on how you have configured the camera device. If your processing is really simple process the data as you are acquiring the data. In reality, you are more likely to acquire the data and store it in local memory for processing. This way you can acquire one image, whilst processing the previous image. Alternatively you only acquire frames when the processing is finished or nearly finished.
> so guys who have worked with cmos cameras, I think I'll have enough > help to solve this issue soon. > thanks.
Last time I worked with Omnivision cameras it was with the actual devices on our own board. -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
Reply by bish October 19, 20082008-10-19
Hi everyone, I want to buy c3038 camera module that uses omnivision's
ov6630 image sensor.
I'm trying to make an interface for this camera in fpga to grab the
frame.
To have the complete control over the incoming data, I thought of
using camera in slave mode. But there seems to be two problem with
that:

i) The ov6630 datasheet says that 'hsync' signal from master should be
connected to chsync/bw (pin 42) pin in sensor. But seeing datasheet of
c3038 it does not seem to have made this pin available to be used.

ii) the timing diagram for ZV port standard shows that href signal is
asserted for new line only when hsync signal goes low after being high
for sometime indicating start of the frame. However, hsync signal we
need to provide in slave mode is supposed to be high when vsync signal
is still high (as shown in slave mode operation timing diagram.)
I'm confused about the hsync and href signal for slave mode.

I'm trying to design at least for now for master mode but then this
will require my interface to wait for the new frame to start when it
needs a frame. I don't know as for now how this can affect the system
which consists of detecting  some object based on the data from the
camera.

so guys who have worked with cmos cameras, I think I'll have enough
help to solve this issue soon.
thanks.