W
[email protected]
- Jan 1, 1970
- 0
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
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;
}
(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?
(3) Any other recommendations for a digital CMOS imaging sensor besides
the C3088?
Thanks in advance,
-weg
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
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;
}
(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?
(3) Any other recommendations for a digital CMOS imaging sensor besides
the C3088?
Thanks in advance,
-weg