meta data for this page
LamaPLC: SC16IS750 / SC16IS752: One or two serial (UART) ports from microcontroller via I²C or SPI communication
The CJMCU-750 is a breakout board that houses the NXP SC16IS750 chip, a high-performance UART (Universal Asynchronous Receiver/Transmitter) with a single channel and support for either I²C or SPI interfaces. It is often used to add a serial port to microcontrollers. The CJMCU-752 also includes the NXP SC16IS752 IC.
The primary difference between the SC16IS750 and SC16IS752 is the number of UART channels: the SC16IS750 is a single-channel UART, while the SC16IS752 is a dual-channel UART. Both chips convert I²C or SPI bus signals to serial ports and share many other features.
Comparison of SC16IS750 and SC16IS752
Key Features and Specifications
- Function: Converts I²C-bus or SPI signals to a single full-duplex UART (Universal Asynchronous Receiver/Transmitter) for protocol conversion.
- Interfaces: Features selectable I²C (up to 400 kHz) or SPI (up to 4 Mbit/s) interfaces.
- UART Data Rates: Supports baud rates up to 5 Mbit/s in 16x clock mode.
- FIFO: Includes 64 bytes of transmit and receive FIFOs.
- Programmable I/O: Provides 8 additional programmable I/O pins, which can be accessed via the I²C or SPI interface.
- Compatibility: Fully compatible with the industrial standard 16C450 and equivalent devices.
- Operating Voltage: Operates on a 3.3 V or 2.5 V supply and logic levels.
- Flow Control: Supports auto hardware flow control (RTS/CTS) and auto software flow control (programmable Xon/Xoff characters).
- Applications: Ideal for industrial control, portable devices, and battery-operated applications due to its low power consumption and compact design.
If you'd like to support the development of the site with the price of a coffee — or a few — please do so here.
Here's a handy tip: you can quickly save this page as a PDF by clicking “export to PDF” in the menu on the right side of the screen.
CJMCU-752 Pinout
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | A0 | I²C address selection or SPI chip select |
| 2 | A1 | I²C 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 | I²C clock input or SPI clock input |
| 26 | SDA/MOSI | I²C data input/output or SPI master-out/slave-in |
| 27 | A2/MISO | I²C address selection or SPI master-in/slave-out |
| 28 | CS | SPI chip select (active low) |
How to Use the SC16IS752 in a Circuit
- Power Supply: Connect the VCC pin to a 3.3V power source and the VSS pins to ground.
- 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.
- Communication Protocol Selection:
- For I²C: Connect SCL and SDA to the microcontroller's I²C 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.
- UART Connections: Connect TXA/RXA and TXB/RXB to the respective UART devices. Use RTS and CTS for hardware flow control if needed.
- GPIO Configuration: Configure GPIO pins as inputs or outputs as required by your application.
Important Considerations and Best Practices
- Add pull-up resistors (usually 4.7kΩ) to the I2C lines (SCL and SDA).
- Place a 0.1 µF capacitor near the VCC pin to decouple the power supply.
- Properly terminate SPI lines to maintain signal integrity.
- Set the baud rate and UART parameters through the SC16IS752's internal registers.
- Use the RESET pin to initialize the device during power-up or fault recovery.
CJMCU-752 Set I2C address
The I²C address of the CJMCU-752 (SC16IS752) is determined by the logic levels of the A0 and A1 pins. These pins can be tied to VDD (VCC), VSS (GND), SCL, or SDA, allowing for up to 16 unique addresses on a single bus.
For most Arduino and Raspberry Pi libraries, you must use the 7-bit address. The default configuration (both pins pulled High) is typically 0x48.
| A1 Pin | A0 Pin | 7-bit Address | 8-bit Write Address |
|---|---|---|---|
| VDD | VDD | 0x48 | 0x90 |
| VDD | VSS(GND) | 0x49 | 0x92 |
| VSS(GND) | VDD | 0x4C | 0x98 |
| VSS(GND) | VSS(GND) | 0x4D | 0x9A |
Important Implementation Notes
- Address Shifting: Hardware documentation often lists addresses in 8-bit format (e.g., 0x90). To get the 7-bit address used in Wire.begin(), shift the value one bit to the right (0x90 » 1 = 0x48).
- Interface Selection: Ensure the I2C/SPI pin is tied High to enable I²C mode; otherwise, these pins may function differently for SPI communication.
- A0 Sharing: In SPI mode, the A0 pin functions as the Chip Select (CS) line.
Arduino
Wiring
Ensure the I2C/SPI pin on the module is tied to High (3.3V) to enable I²C mode.
- VCC: 5V (Board has an on-board 3.3V regulator)
- GND: GND
- SDA: Arduino A4 (Uno) or SDA pin
- SCL: Arduino A5 (Uno) or SCL pin
- A0/A1: Tie to VCC for default address 0x90 (check your specific module's documentation, as some use 0x48).
To use the CJMCU-752 with an Arduino, the most reliable approach is to use the Appnostic SC16IS7XX Library, which supports both the single-channel '750' and dual-channel '752' variants over I²C and SPI.
Arduino 1st code: Check channels
#include <Wire.h> #include <SC16IS7xx.h> // Initialize for I2C with address 0x90 (adjust if your module uses 0x48) SC16IS7xx dualUart = SC16IS7xx(SC16IS7xx_PROTOCOL_I2C, 0x90); void setup() { Serial.begin(115200); // Initialize both UART channels (A and B) at 9600 baud dualUart.a().begin(9600); dualUart.b().begin(9600); Serial.println("SC16IS752 Dual UART Initialized"); } void loop() { // Example: Bridge Channel A data to Channel B if (dualUart.a().available()) { char c = dualUart.a().read(); dualUart.b().write(c); // Echo to the other channel Serial.print("Channel A received: "); Serial.println(c); } // Example: Bridge Channel B data back to A if (dualUart.b().available()) { char c = dualUart.b().read(); dualUart.a().write(c); Serial.print("Channel B received: "); Serial.println(c); } }
Key Implementation Details
- Dual Channels: Use .a() and .b() methods to target specific serial ports on the SC16IS752.
- Crystal Frequency: Most CJMCU boards use a 14.7456 MHz crystal. If your baud rates seem incorrect, verify your crystal and use dualUart.setCrystalFrequency(14745600); before begin().
- 5V Tolerance: The chip operates at 3.3V, but the input pins are 5V tolerant, making it safe for direct connection to an Arduino Uno.
Arduino 2nd code: Use GPIO
To use GPIO0 on the CJMCU-752 (SC16IS752) with an Arduino, you treat the chip as an I/O expander via the same I²C or SPI interface used for the UART channels.
On the CJMCU-752 board, look for the pin labeled GP0 or GPIO0.
- Role: This is one of 8 programmable I/O pins (GPIO0–GPIO7).
- Voltage: While the board is 5V tolerant, these pins typically operate at 3.3V logic levels.
The Appnostic SC16IS7XX library provides direct methods to control these pins without needing manual register writes.
#include <Wire.h> #include <SC16IS7xx.h> // Use address 0x90 (7-bit 0x48) for I2C SC16IS7xx dualUart = SC16IS7xx(SC16IS7xx_PROTOCOL_I2C, 0x90); void setup() { Serial.begin(115200); // Set GPIO0 as an OUTPUT // The second argument is the pin number (0-7) dualUart.pinMode(0, OUTPUT); } void loop() { // Turn GPIO0 High dualUart.digitalWrite(0, HIGH); Serial.println("GPIO0 HIGH"); delay(1000); // Turn GPIO0 Low dualUart.digitalWrite(0, LOW); Serial.println("GPIO0 LOW"); delay(1000); }
If you are writing your own driver, GPIO0 is controlled via the IOControl, IODir, and IOState registers:
- Direction: Set bit 0 of the IODir register (0 = Input, 1 = Output).
- State: Read or write bit 0 of the IOState register to interact with the physical pin.
- Latching: Ensure the IOControl register is configured to enable GPIO functions rather than special UART functions (like modem signals).
Note on SC16IS752 vs 750: In the dual-channel SC16IS752, the GPIO pins are shared and managed at the device level, not per-channel.
I²C topics on lamaPLC
This page has been accessed for: Today: 3, Until now: 47


