Re: C3088 CMOS Imaging Sensor Questions
- From: paul$@pcserviceselectronics.co.uk (Paul Carpenter)
- Date: Thu, 13 Jul 2006 22:02:10 +0100 (BST)
On 13 Jul, in article
<1152823068.907808.161790@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
weg22@xxxxxxxxxx wrote:
Hi all,
I'm looking to purchase the C3088 CMOS imaging sensor. I plan to
interface it with a PIC microcontroller in order to do some image
processing on-board my robot. I was wondering if someone could take a
moment and answer a couple of questions for me.
(1) Would this be reasonable code for capturing a frame of data from
the C3088
Which uses the Omnivision OV6620 sensor.
row=0;
col=0;
// generate interrupt if VSYNC goes high
#INT vsync_isr()
{
while(VSYNC); // wait until VSYNC goes low
while(!HREF); // wait until HREF goes high
while(HREF) // while HREF remains high
{
while(!PCLK); // wait until PCLK goes high
image[row][col] = Y7*128+Y6*64+Y5*32+Y4*16+Y3*8+Y2*4+Y1*2+Y0;
while(PCLK); // wait until PCLK goes low
if(row<356) row++;
else row=0;
}
if(col<292) col++;
else col=0;
}
Assuming the PIC can keep up with normally 8.68MHz * 2 bytes transfers
during an image caputure, what else do you want it to do? Because it will be
almost permanently locked in that interupt routine doing NOTHING else.
Are you sure your PIC has enough RAM for your program variables and at least
a buffer 356 x 292 x 2 bytes EACH! Your PIC does have 256kB of RAM at least
I take it. Normally you need at least two buffers for image processing on
whole images so double that memory requirement to 0.5MB!
You will NOT be able to process on the fly.
(2) I know the clock on the C3088 (I believe it's called the pixel
clock or PCLK) has to be synced up with the clock on my PIC
microcontroller. What's the best way of going about this? If I use a
20 MHz external clock for my PIC, can I also feed that same clock line
into the CMOS sensor?
So you end up with 10MHz burst data to keep up with, which if done by software
means like above, you might get one pixel a line! Just because you can clock
the PIC at 20Mhz does not mean it could do even one of your high level
instructions before another pixel was LOST!
Why a PIC?
Work out what image capture size and update rate you need first.
Work out what algorithms you need to run and how much memory and time they
are likely to use, then when they need to complete by.
When you have worked all that out, THEN and ONLY THEN think about how
you are going to capture it, into what memory, THEN see what is the best
micro match to perform the function.
(3) Any other recommendations for a digital CMOS imaging sensor besides
the C3088?
Nothing wrong with the sensor, PIC cannot do that sort of image processing
without complicated external memory and/or excessively small windowing of
the data, you are making a rod for your own back by trying to squeeze the
Atlantic Ocean into a pint pot!
Thanks in advance,
-weg
--
Paul Carpenter | paul@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<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
.
- Follow-Ups:
- Re: C3088 CMOS Imaging Sensor Questions
- From: weg22
- Re: C3088 CMOS Imaging Sensor Questions
- References:
- C3088 CMOS Imaging Sensor Questions
- From: weg22
- C3088 CMOS Imaging Sensor Questions
- Prev by Date: C3088 CMOS Imaging Sensor Questions
- Next by Date: Re: Timer/Counter/PWM chip suggestion
- Previous by thread: C3088 CMOS Imaging Sensor Questions
- Next by thread: Re: C3088 CMOS Imaging Sensor Questions
- Index(es):
Relevant Pages
|