Arduino library for the NXP SC16IS752 dual UART bridge (I2C/SPI).
Microcontrollers typically offer only a limited number of UART interfaces. When you need to connect multiple serial devices and software-based serial communication is too slow or unreliable, you can use SC16IS752 modules to expand your system. Each module provides two additional hardware serial ports, enabling efficient communication with multiple devices.
- Dual UART channels (A/B)
- I2C or SPI transport
- Per-channel
Streamadapters (channelA()/channelB()) - RS485 helpers
- Interrupt helpers
- Optional logger (
SC16IS752Logger)
For Arduino, you can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with
cd ~/Documents/Arduino/libraries
git clone https://github.com/pschatzmann/SC16IS752.git
- Provide
Wirein the constructor. - Connect:
VCC-> 5V (or board-compatible supply)GND-> GNDSCL-> MCU SCLSDA-> MCU SDA
Typical address mapping from A0/A1 strap:
- A0=HIGH, A1=HIGH ->
0x48 - A0=HIGH, A1=LOW ->
0x49 - A0=LOW, A1=HIGH ->
0x4C - A0=LOW, A1=LOW ->
0x4D
Note: SC16IS750_ADDRESS_* constants are 7-bit I2C addresses and are used directly with Wire.
- Provide
SPIand the cs pin in the constructor. - Connect:
VCC-> 5V (or board-compatible supply)GND-> GNDA0/CS-> MCU CSA1/SI-> MCU MOSINC/SO-> MCU MISOSCL/SCLK-> MCU SCK
Many breakout boards provide onboard 3.3V regulation for the SC16IS752 core and are commonly used with 5V-tolerant interfaces, but always verify your exact board schematic before wiring.
