Simon Ford's Website

CCD Camera!

I found a few hours one evening over christmas to do some first experiments with a CCD Camera I got hold of. The device is the C3038 Colour Camera module which is based on the OmniVision OV6630 CMOS image sensor.

It has a parallel digital data interface outputing the pixel data, and an I2C control interface. Using the default YUV output mode, my first attempt was to continuously sample the most significant bit of the intensity (Y7 – i.e. black-and-white), and use the VSYNC and HREF signals to crudely approximate the position of the sampled data. Here is a picture of the result when I used that to drive an LCD:

You can see on the left my beautiful artwork, the right the CCD module, and at the top the resulting image on the LCD.

My next attempt was to dive in to I2C to be able to have more control over the camera. I’d never used I2C before but found it to be pretty good; the arbitration and acknowledge handshaking means it was fairly easy to code for and debug. In sending a message, you can detect whether you got hold of the bus, whether you sent something, if the addressed slave responded, if it received the data ok etc. This made it very quick to bring up and debug simple wiring or logical bugs.

I used the I2C interface to slow down the pixel clock so my crude sampling would capture at a higher resolution. Here is the result:

Hopefully you can just about make out somone holding a camera (me!). Next step is to decide how to sample the pixel signal properly, and perhaps try and capture more than 1-bit colour depth. Then I guess go colour!