Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use SC16IS752: Examples, Pinouts, and Specs

Image of SC16IS752Design with SC16IS752 in Cirkit Designer

Introduction

The SC16IS752 is a dual-channel I2C/SPI to UART bridge designed to facilitate serial communication between microcontrollers and other devices. It provides a high-speed UART interface with programmable baud rates, making it suitable for a wide range of embedded system applications. The component supports both I2C and SPI protocols, offering flexibility in communication interfaces.

Explore Projects Built with SC16IS752

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Cellular-Connected ESP32-CAM with Real-Time Clock and Isolated Control: A project utilizing SC16IS752 in a practical application
Cellular-Connected ESP32-CAM with Real-Time Clock and Isolated Control

This circuit integrates a LilyGo-SIM7000G module with an RTC DS3231 for timekeeping, interfaced via I2C (SCL and SDA lines). An 8-Channel OPTO-COUPLER is used to isolate and interface external signals with the LilyGo-SIM7000G's GPIOs. Power is managed by a Buck converter, which steps down voltage from a DC Power Source to supply the ESP32-CAM and LilyGo-SIM7000G modules, as well as the OPTO-COUPLER.

Open Project in Cirkit Designer
Image of Cellular-Enabled IoT Device with Real-Time Clock and Power Management: A project utilizing SC16IS752 in a practical application
Cellular-Enabled IoT Device with Real-Time Clock and Power Management

This circuit features a LilyGo-SIM7000G module for cellular communication and GPS functionality, interfaced with an RTC DS3231 for real-time clock capabilities. It includes voltage sensing through two voltage sensor modules, and uses an 8-channel opto-coupler for isolating different parts of the circuit. Power management is handled by a buck converter connected to a DC power source and batteries, with a fuse for protection and a rocker switch for on/off control. Additionally, there's an LED for indication purposes.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

TSSOP-28 Package Pinout

Pin Number Pin Name Description
1 A0 I2C address selection or SPI chip select
2 A1 I2C address selection or SPI chip select
3 RESET Active-low reset input
4 XTAL1 Crystal oscillator input or external clock input
5 XTAL2 Crystal oscillator output
6 VSS Ground
7 TXB UART channel B transmit output
8 RXB UART channel B receive input
9 RTSB UART channel B request-to-send output
10 CTSB UART channel B clear-to-send input
11 GPIO0 General-purpose I/O pin
12 GPIO1 General-purpose I/O pin
13 GPIO2 General-purpose I/O pin
14 GPIO3 General-purpose I/O pin
15 GPIO4 General-purpose I/O pin
16 GPIO5 General-purpose I/O pin
17 GPIO6 General-purpose I/O pin
18 GPIO7 General-purpose I/O pin
19 CTSA UART channel A clear-to-send input
20 RTSA UART channel A request-to-send output
21 RXA UART channel A receive input
22 TXA UART channel A transmit output
23 VSS Ground
24 VCC Power supply input
25 SCL/SCLK I2C clock input or SPI clock input
26 SDA/MOSI I2C data input/output or SPI master-out/slave-in
27 A2/MISO I2C address selection or SPI master-in/slave-out
28 CS SPI chip select (active low)

Usage Instructions

How to Use the SC16IS752 in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V power source and the VSS pins to ground.
  2. Clock Source: Use an external crystal oscillator (e.g., 14.7456 MHz) connected to XTAL1 and XTAL2, or provide an external clock signal to XTAL1.
  3. Communication Protocol Selection:
    • For I2C: Connect SCL and SDA to the microcontroller's I2C pins. Use A0, A1, and A2 to set the I2C address.
    • For SPI: Connect SCLK, MOSI, MISO, and CS to the microcontroller's SPI pins.
  4. UART Connections: Connect TXA/RXA and TXB/RXB to the respective UART devices. Use RTS and CTS for hardware flow control if needed.
  5. GPIO Configuration: Configure GPIO pins as inputs or outputs as required by your application.

Important Considerations and Best Practices

Example Code for Arduino UNO (I2C Mode)

#include <Wire.h>

// SC16IS752 I2C address (A0, A1, A2 = 0)
#define SC16IS752_ADDR 0x48

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Initialize Serial Monitor for debugging

  // Initialize SC16IS752
  Wire.beginTransmission(SC16IS752_ADDR);
  Wire.write(0x03); // Write to the LCR (Line Control Register)
  Wire.write(0x80); // Enable access to the baud rate registers
  Wire.endTransmission();

  Wire.beginTransmission(SC16IS752_ADDR);
  Wire.write(0x00); // DLL (Divisor Latch LSB)
  Wire.write(0x1A); // Set baud rate to 9600 (assuming 14.7456 MHz clock)
  Wire.endTransmission();

  Wire.beginTransmission(SC16IS752_ADDR);
  Wire.write(0x01); // DLM (Divisor Latch MSB)
  Wire.write(0x00); // Set baud rate to 9600
  Wire.endTransmission();

  Wire.beginTransmission(SC16IS752_ADDR);
  Wire.write(0x03); // Write to the LCR again
  Wire.write(0x03); // 8 data bits, no parity, 1 stop bit
  Wire.endTransmission();

  Serial.println("SC16IS752 initialized.");
}

void loop() {
  // Example: Send data to UART channel A
  Wire.beginTransmission(SC16IS752_ADDR);
  Wire.write(0x00); // THR (Transmit Holding Register) for channel A
  Wire.write('H');  // Send character 'H'
  Wire.endTransmission();

  delay(1000); // Wait 1 second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Communication with the SC16IS752:

    • Verify the I2C or SPI connections and ensure the correct protocol is selected.
    • Check the I2C address or SPI chip select configuration.
    • Ensure pull-up resistors are present on the I2C lines.
  2. UART Data Loss or Corruption:

    • Verify the baud rate and UART settings match between the SC16IS752 and the connected device.
    • Use hardware flow control (RTS/CTS) if the connected device supports it.
  3. Device Not Responding After Power-Up:

    • Ensure the RESET pin is properly initialized during startup.
    • Check the power supply voltage and decoupling capacitors.
  4. GPIO Pins Not Functioning:

    • Verify the GPIO pins are correctly configured as inputs or outputs.
    • Check for conflicts with other connected devices.

FAQs