afanasjev
Posts: 2
Joined: Sat Jul 25, 2015 12:54 am

Compute module with 2 cameras and I2C

Wed Jul 29, 2015 10:34 am

I would like to use ComputeModule I2C with two cameras attached. The I2C pins are connected to GPIO pins regarding documentation, so all I2C pins are busy. Is it possible to connect i2c perihperals in such situation?
How the connection schematics will look like?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6074
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Compute module with 2 cameras and I2C

Wed Jul 29, 2015 10:59 am

The pins in the documentation were only chosen because of their convenient location and serve only as an example. You are free to use any other unused pins, as long as your dt-blob reflects that.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7523
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Compute module with 2 cameras and I2C

Wed Jul 29, 2015 11:18 am

Agreed. Use pins other than 2&3 for LED and shutdown (4&5 have been used by others), and amend /boot/dt-blob.bin lines

Code: Select all

[email protected]_0_LED { type = "internal"; number = <2>; };
[email protected]_0_SHUTDOWN { type = "internal"; number = <3>; };
to point to your new pins. You can then enable i2c_arm in config.txt to give you access to /dev/i2c-1 on GPIOs 2&3.

Or use the standard pins for the camera, and route i2c-1 to GPIOs 44 & 45 (J6 pins 33&35 on the IO board) by switching them to ALT2 (you'll need to amend the i2c pin usage in the device tree to avoid changing the function on pins 2&3 from output to ALT0).

In either case you'll need to add your own I2C pull up resistors.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Interfacing (DSI, CSI, I2C, etc.)”