{"id":21878422,"url":"https://github.com/alixahedi/PCF8574-STM32","last_synced_at":"2025-07-21T06:32:10.779Z","repository":{"id":255351245,"uuid":"849292985","full_name":"alixahedi/PCF8574-STM32","owner":"alixahedi","description":"This library can expand the number of IO STM32 microcontrollers with pcf8574.","archived":false,"fork":false,"pushed_at":"2025-05-07T20:12:11.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T21:25:35.239Z","etag":null,"topics":["extender","io","micro","pcf8574","pin","ports","stm32"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alixahedi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-29T10:36:38.000Z","updated_at":"2025-05-07T20:12:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"db6d0b8c-d239-4764-8002-340618363609","html_url":"https://github.com/alixahedi/PCF8574-STM32","commit_stats":null,"previous_names":["alixahedi/pcf8574-stm32","mbedlab/pcf8574-stm32"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alixahedi/PCF8574-STM32","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alixahedi%2FPCF8574-STM32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alixahedi%2FPCF8574-STM32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alixahedi%2FPCF8574-STM32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alixahedi%2FPCF8574-STM32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alixahedi","download_url":"https://codeload.github.com/alixahedi/PCF8574-STM32/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alixahedi%2FPCF8574-STM32/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253614,"owners_count":23900053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extender","io","micro","pcf8574","pin","ports","stm32"],"created_at":"2024-11-28T08:12:42.313Z","updated_at":"2025-07-21T06:32:05.771Z","avatar_url":"https://github.com/alixahedi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PCF8574 STM32 HAL Library\n\nThis library allows you to control the PCF8574 I/O expander using the STM32 HAL library. It supports setting and reading individual pins and controlling multiple PCF8574 modules on a single I2C bus.\n\n## Features\n- Control individual pins on the PCF8574.\n- Support for multiple PCF8574 modules on the same I2C bus.\n- Easily toggle, set, or read the state of each pin.\n- Compatible with STM32 HAL library.\n\n## Requirements\n- STM32 microcontroller\n- STM32 HAL library\n- I2C communication bus\n\n## Getting Started\n\n### Hardware Setup\nConnect the PCF8574 to the I2C bus of the STM32 microcontroller. You can connect up to 8 PCF8574 modules on the same bus by configuring the A0, A1, and A2 address pins.\n\n### Software Setup\n\n1. Include the `pcf8574.h` and `pcf8574.c` files in your project.\n2. Make sure that the I2C peripheral is initialized in your STM32 project.\n\n### Example Usage\n\nHere is an example of how to initialize and use the library:\n\n```c\n#include \"pcf8574.h\"\n\n// Create a handle for PCF8574\nPCF8574_HandleTypeDef pcf8574;\n\nint main(void) {\n    // HAL initialization\n    HAL_Init();\n    \n    // I2C handle (example, customize as needed)\n    I2C_HandleTypeDef hi2c1;\n    // Initialize your I2C peripheral (ensure this is done based on your project setup)\n    // HAL_I2C_Init(\u0026hi2c1);\n\n    // Initialize the PCF8574 with the desired address (A0 = 0, A1 = 0, A2 = 0)\n    PCF8574_Init(\u0026pcf8574, \u0026hi2c1, 0, 0, 0);\n\n    // Set Pin 0 to HIGH (1)\n    PCF8574_WritePin(\u0026pcf8574, 0, GPIO_PIN_SET);\n\n    // Read the state of Pin 0\n    GPIO_PinState state = PCF8574_ReadPin(\u0026pcf8574, 0);\n\n    while (1) {\n        // Toggle Pin 0\n        PCF8574_TogglePin(\u0026pcf8574, 0);\n\n        // Delay for 500 ms\n        HAL_Delay(500);\n    }\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falixahedi%2FPCF8574-STM32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falixahedi%2FPCF8574-STM32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falixahedi%2FPCF8574-STM32/lists"}