SCCB Driver Help
mynet43
Posts: 644
I'm writing a driver to interface with an autofocus camera module. The OmniVision OV3640.
It has a serial interface for command I/O. At first I thought it was a standard i2c interface. But no.
It turns out they have their own serial interface. It's called the SCCB (Serial Camera Control Bus). Instead of an 8-bit interface, it has a 9-bit interface.
I was wondering if anyone has experience with this or has written a driver to support it.
I've attached a copy of the SCCB Spec Sheet.
Any help or suggestions will be greatly appreciated. I can write it, but I'd rather not re-invent the wheel.
Thank you for your help and support.
Jim
It has a serial interface for command I/O. At first I thought it was a standard i2c interface. But no.
It turns out they have their own serial interface. It's called the SCCB (Serial Camera Control Bus). Instead of an 8-bit interface, it has a 9-bit interface.
I was wondering if anyone has experience with this or has written a driver to support it.
I've attached a copy of the SCCB Spec Sheet.
Any help or suggestions will be greatly appreciated. I can write it, but I'd rather not re-invent the wheel.
Thank you for your help and support.
Jim
pdf
612K
Comments
Thanks for getting back to me. I'm still coming up to speed on this camera, so I have a couple of questions:
1. I looked over your code. It looks great. It seems to send an 8-bit i2c address byte, followed by an 8-bit register number, followed by 8-bits of data. The spec sheet for this camera seems to have 16-bit register addresses (see attached page). Do you know what's going on here? Should I change the code to send the two bytes of the register address? Or am I missing something.
2. I ran the i2c register scan program by James Burrows from the OBEX. It has no trouble finding the serial EEPROM. But it doesn't see the camera read or write addresses at all. It's like the ACK status is never set. Do you have any thoughts on this?
Thank you for your help.
Jim
The SCCB bus takes an 8 bit sub address only.
---
Yes, its possible the device never ACKs. Use a bus pirate to check. If so, then remove the ACK checks that are in the code I gave you.
The 16 bit addresses go from 0x3000 up to 0x3709 and everything in between. So I'm still not sure what's going on.
I think I'll start by sending the last byte of the register address and ignoring the ACK to see what I get.
Let me know if you think of something else.
Thanks!
Jim