{"id":20989760,"url":"https://github.com/robtillaart/dac8552","last_synced_at":"2025-10-10T06:39:31.466Z","repository":{"id":45408457,"uuid":"253515754","full_name":"RobTillaart/DAC8552","owner":"RobTillaart","description":"Arduino library for DAC8552 Digital Analog Convertor","archived":false,"fork":false,"pushed_at":"2024-05-23T13:52:05.000Z","size":46,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T22:02:14.774Z","etag":null,"topics":["arduino","dac","esp32"],"latest_commit_sha":null,"homepage":"","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/RobTillaart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"RobTillaart","custom":"https://www.paypal.me/robtillaart"}},"created_at":"2020-04-06T14:05:29.000Z","updated_at":"2025-02-25T21:52:44.000Z","dependencies_parsed_at":"2024-11-19T06:41:22.949Z","dependency_job_id":null,"html_url":"https://github.com/RobTillaart/DAC8552","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/RobTillaart/DAC8552","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDAC8552","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDAC8552/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDAC8552/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDAC8552/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobTillaart","download_url":"https://codeload.github.com/RobTillaart/DAC8552/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FDAC8552/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002970,"owners_count":26083489,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arduino","dac","esp32"],"created_at":"2024-11-19T06:26:03.516Z","updated_at":"2025-10-10T06:39:31.435Z","avatar_url":"https://github.com/RobTillaart.png","language":"C++","funding_links":["https://github.com/sponsors/RobTillaart","https://www.paypal.me/robtillaart"],"categories":[],"sub_categories":[],"readme":"\n[![Arduino CI](https://github.com/RobTillaart/DAC8552/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)\n[![Arduino-lint](https://github.com/RobTillaart/DAC8552/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/DAC8552/actions/workflows/arduino-lint.yml)\n[![JSON check](https://github.com/RobTillaart/DAC8552/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/DAC8552/actions/workflows/jsoncheck.yml)\n[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/DAC8552.svg)](https://github.com/RobTillaart/DAC8552/issues)\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/DAC8552/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/RobTillaart/DAC8552.svg?maxAge=3600)](https://github.com/RobTillaart/DAC8552/releases)\n[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/DAC8552.svg)](https://registry.platformio.org/libraries/robtillaart/DAC8552)\n\n\n# DAC8552\n\nArduino library for DAC8552 SPI Digital Analog Convertor.\n\n\n## Description\n\nThe DAC8552 is a SPI based 16 bit DAC with two channels.\n\n**Warning** This library is not tested extensively.\n\n\n\n#### 0.5.0 Breaking change\n\nVersion 0.5.0 introduced a breaking change to improve handling the SPI dependency.\nThe user has to call **SPI.begin()** or equivalent before calling **DAC.begin()**.\nOptionally the user can provide parameters to the **SPI.begin(...)**\n\n\n#### 0.4.0 Breaking change\n\nBugfix channel select bit, invalidates all pre 0.4.0 versions\n\n\n#### 0.3.0 Breaking change\n\nThe version 0.3.0 has breaking changes in the interface. \nThe essence is removal of ESP32 specific code from the library. \nThis makes it possible to support the ESP32-S3 and other processors in the future. \nAlso it makes the library a bit simpler to maintain.\n\nNote order of parameters changed.\n\n\n#### Related\n\n- https://github.com/RobTillaart/DAC8550\n- https://github.com/RobTillaart/DAC8551\n- https://github.com/RobTillaart/DAC8552\n- https://github.com/RobTillaart/DAC8554\n- https://github.com/RobTillaart/MCP_DAC\n- https://github.com/RobTillaart/AD5680  (18 bit DAC)\n\n\n## Interface\n\n```cpp\n#include \"DAC8552.h\"\n```\n\n### Core\n\n- **DAC8552(uint8_t select, SPIClassRP2040 \\* spi = \u0026SPI)** Constructor HW SPI RP2040.\n- **DAC8552(uint8_t select, SPIClass \\* spi = \u0026SPI)** Constructor HW SPI other.\n- **DAC8552(uint8_t select, uint8_t spiData, uint8_t spiClock)** Constructor SW SPI.\n- **DAC8532(...)** idem constructors for DAC8532.\n- **void begin()** initializes all pins to default state\n- **void bufferValue(uint8_t channel, uint16_t value)**\n- **void setValue(uint8_t channel, uint16_t value)** set the value of the chosen channel to 0 - 65535\n- **uint16_t getValue(uint8_t channel)**returns the last value written.\n\n\n### Hardware SPI\n\nTo be used only if one needs a specific speed.\n\n- **void setSPIspeed(uint32_t speed)** set SPI transfer rate.\n- **uint32_t getSPIspeed()** returns SPI transfer rate.\n- **bool usesHWSPI()** returns true if HW SPI is used.\n\n\n### Power down\n\nCheck datasheet for details.\n\n- **void bufferPowerDown(uint8_t channel, uint8_t powerDownMode)** ets power down mode. 0 - 3, \nbut waits until (TODO CHECK DATASHEET)\n- **void setPowerDown(uint8_t channel, uint8_t powerDownMode)** sets power down mode. 0 - 3.\n- **uint8_t getPowerDownMode(uint8_t channel)** returns last written mode.\n\n| Power down mode            | Value |\n|:---------------------------|:-----:|\n| DAC8552_POWERDOWN_NORMAL   |   0   |\n| DAC8552_POWERDOWN_1K       |   1   |\n| DAC8552_POWERDOWN_100K     |   2   |\n| DAC8552_POWERDOWN_HIGH_IMP |   3   |\n\n\n\n## Operation\n\nSee examples\n\n**demo_hw_spi.ino**\n- write a sawtooth to channel A followed by a sinus \n- uses HW SPI\n\n**demo_sw_spi.ino**\n- write a sawtooth to channel A followed by a sinus \n- uses SW SPI\n\n**demo_same_time_write.ino**\n- writes two square waves that trigger at the same time\n\n**demo_sequential_write.ino**\n- writes two square waves sequentially (slight time difference)\n\n**demo_powerdown.ino**\n- idem\n\n\n## Future\n\n#### Must\n\n- improve documentation\n- testing with hardware\n\n\n#### Should\n\n#### Could\n\n- performance measurements\n\n\n#### Wont\n\n\n## Support\n\nIf you appreciate my libraries, you can support the development and maintenance.\nImprove the quality of the libraries by providing issues and Pull Requests, or\ndonate through PayPal or GitHub sponsors.\n\nThank you,\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fdac8552","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobtillaart%2Fdac8552","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobtillaart%2Fdac8552/lists"}