{"id":16146120,"url":"https://github.com/libdriver/pca9685","last_synced_at":"2025-04-09T07:08:30.919Z","repository":{"id":37344047,"uuid":"455810207","full_name":"libdriver/pca9685","owner":"libdriver","description":"PCA9685 full function driver library for general MCU and Linux.","archived":false,"fork":false,"pushed_at":"2025-03-09T04:29:20.000Z","size":3787,"stargazers_count":62,"open_issues_count":0,"forks_count":29,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T06:07:01.447Z","etag":null,"topics":["c","full-function-driver","iic","led-controller","linux","mcu","pca9685","pwm"],"latest_commit_sha":null,"homepage":"https://www.libdriver.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libdriver.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-05T07:57:21.000Z","updated_at":"2025-03-11T10:48:27.000Z","dependencies_parsed_at":"2024-03-24T11:21:58.758Z","dependency_job_id":"9aa7d867-688a-4f4d-9de7-f1a87d8330b4","html_url":"https://github.com/libdriver/pca9685","commit_stats":null,"previous_names":["libdriver/pca9685"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdriver%2Fpca9685","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdriver%2Fpca9685/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdriver%2Fpca9685/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdriver%2Fpca9685/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libdriver","download_url":"https://codeload.github.com/libdriver/pca9685/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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":["c","full-function-driver","iic","led-controller","linux","mcu","pca9685","pwm"],"created_at":"2024-10-10T00:18:56.093Z","updated_at":"2025-04-09T07:08:30.899Z","avatar_url":"https://github.com/libdriver.png","language":"C","readme":"[English](/README.md) | [ 简体中文](/README_zh-Hans.md) | [繁體中文](/README_zh-Hant.md) | [日本語](/README_ja.md) | [Deutsch](/README_de.md) | [한국어](/README_ko.md)\n\n\u003cdiv align=center\u003e\n\u003cimg src=\"/doc/image/logo.svg\" width=\"400\" height=\"150\"/\u003e\n\u003c/div\u003e\n\n## LibDriver PCA9685\n\n[![MISRA](https://img.shields.io/badge/misra-compliant-brightgreen.svg)](/misra/README.md) [![API](https://img.shields.io/badge/api-reference-blue.svg)](https://www.libdriver.com/docs/pca9685/index.html) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](/LICENSE)\n\nThe PCA9685 is an I2C-bus controlled 16-channel LED controller optimized for Red/Green/Blue/Amber (RGBA) color backlighting applications. Each LED output has its own 12-bit resolution (4096 steps) fixed frequency individual PWM controller that operates\nat a programmable frequency from a typical of 24 Hz to 1526 Hz with a duty cycle that is adjustable from 0 % to 100 % to allow the LED to be set to a specific brightness value.All outputs are set to the same PWM frequency.Each LED output can be off or on (no PWM control), or set at its individual PWM controller value. The LED output driver is programmed to be either open-drain with a 25 mA current sink capability at 5 V or totem pole with a 25 mA sink, 10 mA source capability at 5 V. The PCA9685 operates with a supply voltage range of 2.3 V to 5.5 V and the inputs and outputs are 5.5 V tolerant. LEDs can be directly connected to the LED output (up to 25 mA, 5.5 V) or controlled with external drivers and a minimum amount of discrete components for larger current or higher voltage LEDs.It can be used in RGB or RGBA LED drivers, LED status information, LED displays, LCD backlights, Keypad backlights for cellular phones or handheld devices and so on.\n\nLibDriver PCA9685 is the full function driver of PCA9685 launched by LibDriver.PCA9685 provides pwm output and other functions. LibDriver is MISRA compliant.\n\n### Table of Contents\n\n  - [Instruction](#Instruction)\n  - [Install](#Install)\n  - [Usage](#Usage)\n    - [example basic](#example-basic)\n  - [Document](#Document)\n  - [Contributing](#Contributing)\n  - [License](#License)\n  - [Contact Us](#Contact-Us)\n\n### Instruction\n\n/src includes LibDriver PCA9685 source files.\n\n/interface includes LibDriver PCA9685 IIC platform independent template.\n\n/test includes LibDriver PCA9685 driver test code and this code can test the chip necessary function simply.\n\n/example includes LibDriver PCA9685 sample code.\n\n/doc includes LibDriver PCA9685 offline document.\n\n/datasheet includes PCA9685 datasheet.\n\n/project includes the common Linux and MCU development board sample code. All projects use the shell script to debug the driver and the detail instruction can be found in each project's README.md.\n\n/misra includes the LibDriver MISRA code scanning results.\n\n### Install\n\nReference /interface IIC platform independent template and finish your platform IIC driver.\n\nAdd the /src directory, the interface driver for your platform, and your own drivers to your project, if you want to use the default example drivers, add the /example directory to your project.\n\n### Usage\n\nYou can refer to the examples in the /example directory to complete your own driver. If you want to use the default programming examples, here's how to use them.\n\n#### example basic\n\n```C\n#include \"driver_pca9685_basic.h\"\n\nuint8_t res;\nuint32_t i, times;\npca9685_address_t address;\npca9685_channel_t channel;\n\naddress = PCA9685_ADDRESS_A000000;\nchannel = PCA9685_CHANNEL_0;\ntimes = 10;\n\nres = pca9685_basic_init(address, 50);\nif (res != 0)\n{\n    return 1;\n}\n\n...\n\nfor (i = 1; i \u003c times + 1; i++)\n{\n    res = pca9685_basic_write(channel, 0.0f, 2.5f + (float)(i) / (float)(times) * 10.0f);\n    if (res != 0)\n    {\n        (void)pca9685_basic_deinit();\n\n        return 1;\n    }\n\n    pca9685_interface_debug_print(\"pca9685: set channel %d %0.2f degrees.\\n\", channel, (float)(i) / (float)(times) * 180.0f);\n\n    pca9685_interface_delay_ms(1000);\n    \n    ...\n}\n\n...\n\n(void)pca9685_basic_deinit();\n\nreturn 0;\n```\n\n### Document\n\nOnline documents: [https://www.libdriver.com/docs/pca9685/index.html](https://www.libdriver.com/docs/pca9685/index.html).\n\nOffline documents: /doc/html/index.html.\n\n### Contributing\n\nPlease refer to CONTRIBUTING.md.\n\n### License\n\nCopyright (c) 2015 - present LibDriver All rights reserved\n\n\n\nThe MIT License (MIT) \n\n\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n\nof this software and associated documentation files (the \"Software\"), to deal\n\nin the Software without restriction, including without limitation the rights\n\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\ncopies of the Software, and to permit persons to whom the Software is\n\nfurnished to do so, subject to the following conditions: \n\n\n\nThe above copyright notice and this permission notice shall be included in all\n\ncopies or substantial portions of the Software. \n\n\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\nSOFTWARE. \n\n### Contact Us\n\nPlease send an e-mail to lishifenging@outlook.com.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibdriver%2Fpca9685","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibdriver%2Fpca9685","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibdriver%2Fpca9685/lists"}