Template: PCF8574 IO Expansion Board STM32 Guide
From Waveshare Wiki
The STM32 examples are based on the STM32F103RBT6 and the STM32H743. The connection provided below is based on the STM32F103RB. If you need to use other STM32 boards, you may need to change the hardware connection and port the code yourself.
Use with STM32
Hardware connection
PCF8574 | STM32 | Description |
---|---|---|
VCC | 3.3V | Power input |
GMD | GND | Power ground |
SDA | PB9 | I2C data input |
SCL | PB8 | I2C clock pin |
Examples
The examples are developed based on the HAL libraries. Download the Demo codes archive to your PC. Unzip and find the STM32 project from PCF8574-Code\STM32\STM32F103RB\MDK-ARM.
- Open the PCF8574 IO Expansion Board.uvprojx file by Keil.
- Build and the project.
- Program the project to your STM32 board.
- Connect the UART1 of your STM32 board to the PC and check the serial data by SSCOM software.