pinout.vvzero.com/draft/overlay/gpio-i2c-phat.md

97 lines
2.3 KiB
Markdown
Raw Normal View History

2021-05-22 03:26:45 +08:00
<!--
---
name: GPIO I2C pHAT
class: board
type: io
formfactor: pHAT
manufacturer: PlasmaDan
description: 4 Extra I2C Buses for Raspberry Pi.
2021-05-22 08:23:24 +08:00
url: https://plasmadan.com/gpioi2c
2021-05-22 03:26:45 +08:00
github: https://github.com/plasmadancom/GPIO-I2C-pHAT
buy: https://plasmadan.com/gpioi2c
image: 'gpio-i2c-phat.png'
pincount: 40
eeprom: no
pin:
2021-05-22 08:23:24 +08:00
'7':
2021-05-22 03:26:45 +08:00
name: I2C3 SDA
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'15':
name: I2C6 SDA
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'16':
name: I2C6 SCL
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'29':
name: I2C3 SCL
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'21':
name: I2C4 SCL
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'24':
name: I2C4 SDA
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'32':
name: I2C5 SDA
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
'33':
name: I2C5 SCL
mode: i2c
2021-05-22 08:23:24 +08:00
direction: both
active: high
2021-05-22 03:26:45 +08:00
-->
# GPIO I2C pHAT
2021-05-22 08:23:24 +08:00
The GPIO I2C pHAT is an I2C switch which mounts under your HAT to remap its I2C pins (GPIO 2 & GPIO 3) to 1 of 4 additional I2C buses, without the need for a multiplexer or expander.
2021-05-22 03:26:45 +08:00
2021-05-22 08:23:24 +08:00
Makes use of the extra hardware I2C buses introduced on Raspberry Pi 4 (BCM2711) or software I2C (bit bang). Switching is controlled using a 4-position double-pole slide switch, which allows you to quickly switch between buses.
2021-05-22 03:26:45 +08:00
## Features
* Adds 4 additional I2C buses with breakout
* User selectable I2C GPIO pin remapping
2021-05-22 08:23:24 +08:00
* Hardware I2C compatible (Pi 4)
2021-05-22 03:26:45 +08:00
* Slide switch allows fast bus switching
* No-conflict solder jumpers
* Stackable design
* Immersion gold plated copper
## Usage
Add required dtoverlay parameter(s) to ```/boot/config.txt``` and reboot.
2021-05-22 08:23:24 +08:00
Mount the GPIO I2C pHAT board to your Pi, use the slide switch to select your preferred I2C bus and stack your I2C based HAT on top.
## Hardware I2C (Pi 4 Only)
```
dtoverlay=i2c3
dtoverlay=i2c4
dtoverlay=i2c5
dtoverlay=i2c6
```
## Software I2C (Bit Bang)
```
dtoverlay=i2c-gpio,bus=6,i2c_gpio_sda=22,i2c_gpio_scl=23
dtoverlay=i2c-gpio,bus=5,i2c_gpio_sda=12,i2c_gpio_scl=13
dtoverlay=i2c-gpio,bus=4,i2c_gpio_sda=8,i2c_gpio_scl=9
dtoverlay=i2c-gpio,bus=3,i2c_gpio_sda=4,i2c_gpio_scl=5
```
2021-05-22 03:26:45 +08:00
2021-05-22 08:23:24 +08:00
Note: When using multiple software I2C buses, it's best to add the parameters from highest to lowest, i.e., 6, 5, 4, 3.