Zum Inhalt springen

WSAL15667 – Serial Expansion HAT/en

Aus JW Tech Wiki
Version vom 6. September 2026, 00:39 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The Waveshare Serial Expansion HAT adds two UART channels and eight programmable GPIOs to a compatible Raspberry Pi via an I2C interface. Addressing is set with the A0/A1 jumpers; the default setup is 3.3 V and address 0x48.

Related products at JW Tech

Technical overview

  • Compatibility: Raspberry Pi Zero, Zero W, Zero WH, 2B, 3B, 3B+.
  • Control chip: SC16IS752 (dual UART + 8 GPIO) over I2C.
  • Operating voltage: 3.3 V; dimensions: 65 × 30 mm; mounting hole 3.0 mm.
  • Default I2C address: 0x48 (A0 and A1 soldered to 3.3 V).
  • Change the address by soldering 0 Ω resistors on A0/A1; the table lists 8-bit values, while the actual 7-bit address is obtained by right-shifting one bit.
  • Status LEDs: PWR, TXDA, RXDA, TXDB, RXDB indicate channel state.
  • Newer revisions (after 29 Dec 2021): the interrupt pin is configurable with resistors, allowing up to five stacked devices; older revisions (before 31 Dec 2019) hard-wire the interrupt to a fixed Pi GPIO.
  • Multiple modules each need their own I2C address and, if needed, their own interrupt pin; more than five devices must be connected by cable.
  • On Debian Bookworm only the lgpio library is available; bcm2835 and wiringPi are not installable there.
  • Demo code in C and Python is available online; examples use a default baud rate of 115200.

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
sudo nano /boot/config.txt
dtoverlay=sc16is752-i2c,int_pin=24,addr=0x48
ls /dev
sudo apt-get install i2c-tools
sudo i2cdetect -y 1
dtoverlay=sc16is752-i2c,int_pin=23,addr=0x49

Notes and version constraints

  • The exact hardware revision (old/new) determines whether the interrupt pin is hard-wired or resistor-switchable – verify before stacking.
  • Under Ubuntu on the Pi, /boot/config.txt appears empty on the device; edit it via the SD card slot on a host computer.
  • The I2C address table lists 8-bit values; the usable address is the value after a one-bit right shift (e.g., 0x90 → 0x48).
  • Stacking beyond five devices requires additional cabling instead of jumpers.
  • Availability of bcm2835/wiringPi depends heavily on the OS release; both are unavailable under Bookworm.
  • Before testing external serial devices, GND must be connected.
  • If the expected ttySC* entries do not appear, re-check addresses and interrupt pins with i2cdetect.

Source and revision record