bagelwoof
Posts: 2
Joined: Sat Jun 12, 2021 2:02 am

Arbitrary GPIO Pins For I2C?

Sat Jun 12, 2021 2:05 am

I have a Pi4 that I've fit with a TexasPOE hat that sits on the pins for the first POE bus. I'd like to add an I2C realtime clock to the pi, but can't just wire it to the first I2C bus due to the POE hat.

I'd like to configure an additional bus (bus 3) using GPIO 22 for SDA and GPIO 27 for SCL. When I look at GPIO pinout diagrams, other pins are specified for I2C communication.

My question:
Can I specify arbitrary pins for SDA and SCL, or do they need to be the pairs that are shown in the pinout diagrams?

User avatar
joan
Posts: 15659
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Arbitrary GPIO Pins For I2C?

Sat Jun 12, 2021 11:29 am

Look in /boot/overlays/README for help on setting up a software I2C bus.

bagelwoof
Posts: 2
Joined: Sat Jun 12, 2021 2:02 am

Re: Arbitrary GPIO Pins For I2C?

Mon Jun 14, 2021 10:20 pm

File doesn't exist on my Pi.
I'm running the latest 64 bit build of Raspian because some of the software I'm running on that Pi requires a 64 bit OS. Will check on one a Pi running a 32 bit RaspiOS...

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

Re: Arbitrary GPIO Pins For I2C?

Tue Jun 15, 2021 8:33 am

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.)”