4
\$\begingroup\$

I have two OV5640 images sensors that I need to configure using I2C. Both have the same I2C address and are on the same I2C bus and both will be configured identically.

As the configuration profiles for these cameras are quite large, I was wondering if it would be possible to write the configuration from the MCU to both cameras at the same time? I do not need to read from the cameras via I2C.

The OV cameras use the SCCB interface, which is similar to I2C but with some slight differences (I think the main one being the lack of the ACK signal).

I am almost certain the answer is "no" but I would like to understand why.

\$\endgroup\$
1
\$\begingroup\$

All devices share the same SD SC bus with Rpullup and C load on cables.

THere is no apparent reason why each device cannot use the same address and data and decode at same time as long as all timing and V specs are maintained if there is no ACK on SCCB.

Choose R pullup for 3 mA then R*C load affects slew rate and noise rejection. Since driver has internal RdsOn <100 ohm this raises Vol slightly when smaller R pullups are used . Optimum R pullup is when you have balanced noise margin outside logic input threshold of 30% Vdd and 70% Vdd thresholds for Vol, Voh.

details

e.g. if driver is 100R ESR or Rdson Low and Rpullup to 1.8V is 500 Ohms then 3.0mA for Iol (1.8V/(100R+500R)=3.0mA) So you may adjust R pullup from this starting point. THen probe correctly with short 10:1 probe pins to avoid >10MHz ringing) or use diff. probes or two 10:1 calibrated probes A-B with flatline on A-B to same signal then if OK, move one probe pin to gnd pin beside SD , SC test pins. ALways include test pins + gnd pin < 1cm apart.

Choice of cable capacitance and length determines C load. usually 60pF/m for ribbon or twisted pair and higher if shielded. If rise time at 400kHz is too slow then switched R Pullup method may be used.

\$\endgroup\$
  • \$\begingroup\$ Thanks Tony, that's an incredibly detailed answer. I'll definitely use this to determine the optimum value for the pull-ups. \$\endgroup\$ – Zapho Aug 3 '17 at 13:19
0
\$\begingroup\$

If they have the same I2C address and you don't need to read data back from them, then yes, you can write the configuration to both at the same time.

However, configuring both at the same time runs the risk of masking a non-functional sensor. Each byte written over I2C is followed by an ACK, sent by the slave. If one sensor is not responding, the I2C master will not be able to detect that. The other (functional) sensor will still be ACKing away.

\$\endgroup\$
  • \$\begingroup\$ Could the down voters please explain where I'm wrong? \$\endgroup\$ – CHendrix Aug 3 '17 at 11:10
0
\$\begingroup\$

The SCCB is a proprietary interface from OMNIvision. The main mode is to control a single-address device, but it can control several devices by disabling unnecessary devices using suspend (PWDN) signal, in so called "three-wire-mode".

Here is a very useful application note 101 from Omnivision.

You also need to make sure that your I2C controller ignores the lack of I2C ACK. Some people did modifications (or bit-banging) to communicate with Omnivision cameras.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.