News:

;) This forum is the property of Proton software developers

Main Menu

Talking to an OV7670 camera module

Started by david, Nov 11, 2026, 08:16 PM

Previous topic - Next topic

david

Hi All,
I'm using a 16F1827 to connect to an OV7670 module but I can't seem to get reliable data back from the module.  I'm not after image transfer and I was hoping to use it as a basic optical line scan using just the lines near the centre of the image.  Update rate can be several seconds as the image is very slow changing.
I've tried I2CIn/Out and BusIn/Out and while I can talk to the device, I can't get reliable data back and only once saw the correct device ID number returned.
If anyone has used this part (now quite old) I would appreciate what they used to communicate with it.  I don't know if it's important but I'm running the PIC at 16MHz and using the ClkOut pin to provide 4MHz for the camera's XClk input which is lower than typical usage.  Of course I also enlisted AI's help which is why I went to bed at 3:30am with it still not working.

Cheers,
David

david

Don't overthink the problem - Positron makes it much easier than I expected.

This returns the Device ID and Version number showing comms are working.

BusOut $42,[$0A]  'Camera address+Write, ID address
BusIn $43, [ID]   'Camera address+Read, ID value
               
BusOut $42,[$0B]  'Camera address+Write, Version address
BusIn $43, [VER]  'Camera address+Read, Version value

Delays between commands appear to be optional if you think 1mS is going to change your life.
Next step is to configure the camera for low res greyscale and actually output some pixel data.

Cheers,
David

▲