Zum Inhalt springen

WSAL22132 – AW9523B IO Expansion Board/en

Aus JW Tech Wiki

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

Technical overview of the AW9523B board with an I2C interface, 16 expandable I/O pins, and guides for Raspberry Pi, Arduino, and STM32.

Related products at JW Tech

Technical overview

  • The board uses an AW9523B controller with an I2C interface and provides 16 I/O pins.
  • Operating voltage is 3.3 V or 5 V; pinout includes VCC, GND, SDA, SCL, INT (interrupt output), and RST (reset).
  • By changing the I2C address, up to four boards can be connected simultaneously, providing up to 64 I/O ports in total.
  • For Raspberry Pi, enabling the I2C driver via “sudo raspi-config” under Interfacing Options is recommended, followed by a reboot.
  • On Bookworm, only the lgpio library is available; bcm2835 and wiringPi cannot be installed or used there. The Python demo can run without additional installation.
  • Raspberry Pi hardware connections are: VCC to 5V, GND to GND, SDA to pin 3, SCL to pin 5, INT to pin 16, RST to pin 18.
  • Example code for C and Python is included in the downloaded “AW9523B-IO-Expansion-Board-Code” archive. For C: “cd C”, “sudo make clean”, “sudo make”, “sudo ./main”. For Python: “cd python”, “sudo python AW9523B.py”.
  • In the test case, PAx pins are configured as outputs and PBx pins as inputs; the states toggle every 550 ms alternately like a chasing-light pattern.

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
sudo wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
sudo tar zxvf bcm2835-1.71.tar.gz
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
sudo apt-get install wiringpi
wget https://files.waveshare.com/wiki/common/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo git clone https://github.com/WiringPi/WiringPi
cd WiringPi
sudo ./build
sudo su
wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
sudo make install
sudo apt-get install p7zip-full -y
sudo wget https://files.waveshare.com/upload/b/b8/AW9523B-IO-Expansion-Board-Code.7z

Notes and version constraints

  • The guide is based on the Arduino UNO R3; other Arduino boards may require modified connections or code changes.
  • The STM32 examples are based on the STM32F103RBT6; other STM32 boards may need different connections and code modifications.
  • When using Bookworm, bcm2835 and wiringPi are unavailable; only lgpio is supported.
  • The interrupt line (INT) and reset line (RST) may be left unconnected if not needed (“could NC”).
  • To disable the interrupt function, add “gpio=23=pu” to /boot/config.txt to set GPIO23 to pull-up mode.

Source and revision record