Camera module

This forum is used for discussing hardware, software, and technical details of the AVRcam embedded system.

Camera module

Postby microchip » Sun May 07, 2006 6:41 am

Hello
First off, I must say I'm very impressed by your AVRcam. I think it's incredible how you were able to squeeze all those algorithms into a mega8.

Now for my question. I read somewhere that you used the same crystal for the microcontroller and camera module to gain higher transfer rates. How exactly does that work? And why does it lead to higher transfer rates?
microchip
 
Posts: 3
Joined: Wed May 03, 2006 6:14 am

Postby arvind » Sun May 07, 2006 9:04 am

i believe PCLK decides transfer rate..hence if higher clock rate,higher PCLK and hence higher transfer rate
arvind
 
Posts: 14
Joined: Mon Jul 25, 2005 8:14 am

Postby microchip » Sun May 07, 2006 12:25 pm

But why does using the _SAME_ crystal give a higher transfer rate?
microchip
 
Posts: 3
Joined: Wed May 03, 2006 6:14 am

Postby johno » Mon May 08, 2006 7:16 pm

It all comes down to the processing that needs to be done with the data coming from the camera. A typical loop processing loop would look like the following (executing on the mega8):

start loop
wait for PCLK to go high
sample Y data bus for a red value
sample UV data bus for a green value
wait for PCLK to go low
wait for PCLK to go high
sample UV data bus for a blue value
perform some processing on the sampled data (in the case of the AVRcam, decide if the RGB value is in the color map, and run-length compress the data in the current line)
end loop

All of this processing needs to be done in around 16 clock cycles to keep up with the full-speed image stream from the OV6620. However, just the loop to monitor when PCLK changes state, and loop back to check again if it HAS NOT changed state, can maximally take 3 or 4 clock cycles. As you can see, this would simply eat up too much time.

So the trick here is to use the same clock source for both the mega8 and the OV6620. Thus, I no longer need to sample the PCLK line in between pixel data; I just need to synch up once with it at the beginning of each line. Once the timing is set, I can guarantee that, say, every 6 clock cycles, the data on the data bus will have changed values, and will be ready for sampling, thus eliminating all those cycles checking the state of PCLK. If different, un-synchronized clock rates were used for the mega8 and the OV6620, this wouldn't be possible.

Make sense?
-John O
Site Admin
johno
 
Posts: 51
Joined: Thu Mar 16, 2006 2:29 pm

Postby microchip » Tue May 09, 2006 7:19 am

Hmm, yes, makes sense :) But why do you need to syncrhonise at the beginning of each line then? Doesn't it always take just as long between each line?

And another question. If you would make your AVRcam again, would you use the same camera module?
microchip
 
Posts: 3
Joined: Wed May 03, 2006 6:14 am

Postby nasga » Sat May 13, 2006 4:31 am

Can I change C3088 with C3188?
I only have C3188..
So, can I change C3088 with my C3188?
Please..
Need help
nasga
 
Posts: 2
Joined: Sat May 13, 2006 4:18 am

Postby johno » Sat May 13, 2006 9:43 am

No, the AVRcam only works with the C3088 module (which uses the OV6620). Search the forums for other threads discussing the C3188 module.
-John O
Site Admin
johno
 
Posts: 51
Joined: Thu Mar 16, 2006 2:29 pm

Postby nasga » Mon May 15, 2006 8:36 am

johno wrote:No, the AVRcam only works with the C3088 module (which uses the OV6620). Search the forums for other threads discussing the C3188 module.


Therefore, do you know how to use my C3188 module?

thanks before...
nasga
 
Posts: 2
Joined: Sat May 13, 2006 4:18 am

Postby alex » Tue May 16, 2006 8:45 am

I would also like to know which parts of the system have to be modified in order to work with another camera module.

And also if my camera does not work with QCIF resolution, is it possibile to use QVGA resolution by modifying the image processing code?

As I know VT6620 is an old model and will be faded out very soon. I can't find this model from the OmniVision web site. I think there is a need to make it compatiable to the new components which provide better quality video source so as to improve the tracking result.

Thank you very much for your help in advance!

Alex
alex
 
Posts: 1
Joined: Tue May 16, 2006 2:34 am

Postby johno » Sat May 20, 2006 1:06 pm

I agree that the OV6620 is an older module, but it is one of the only modules that can be purchased already mounted on a PCB, with a lens, and with all i/o brought out to 0.1" headers. And did I mention that the datasheet is freely available? All of this makes working with the module fairly straightforward.

I would love it if someone took on the project to support another more current camera module. The module would have to minimally support QCIF data, since I'm pretty sure this is the fastest stream that a small micro can keep up with in real time. It would also have to bring out a clock signal to allow the external micro to synch up with it (like the AVRcam does). Of course, it is also possible to drop another micro into the system instead of an AVR...I've thought about doing similar things with an ARM7TDMI (specifically, the LPC2103 ARM from Phillips), but have yet to find the time to make it happen. I would certainly encourage anyone interested to give it a shot. I'd be available for answering questions if needed.
-John O
Site Admin
johno
 
Posts: 51
Joined: Thu Mar 16, 2006 2:29 pm


Return to AVRcam Embedded System

Who is online

Users browsing this forum: No registered users and 17 guests

cron