{"id":41879791,"url":"https://github.com/faultytwo/max51x-arduino-lib","last_synced_at":"2026-01-25T13:02:43.880Z","repository":{"id":40647640,"uuid":"451159498","full_name":"FaultyTwo/MAX51X-arduino-lib","owner":"FaultyTwo","description":"An Arduino library for MAX517/518/519, 8-bit DAC I2C with R2R Outputs","archived":false,"fork":false,"pushed_at":"2023-01-11T07:23:47.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-10T11:55:42.405Z","etag":null,"topics":["arduino","arduino-library","dac"],"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/FaultyTwo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-23T16:17:02.000Z","updated_at":"2022-12-21T15:42:01.000Z","dependencies_parsed_at":"2023-02-09T02:16:44.306Z","dependency_job_id":null,"html_url":"https://github.com/FaultyTwo/MAX51X-arduino-lib","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/FaultyTwo/MAX51X-arduino-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FaultyTwo%2FMAX51X-arduino-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FaultyTwo%2FMAX51X-arduino-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FaultyTwo%2FMAX51X-arduino-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FaultyTwo%2FMAX51X-arduino-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FaultyTwo","download_url":"https://codeload.github.com/FaultyTwo/MAX51X-arduino-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FaultyTwo%2FMAX51X-arduino-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28753411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","arduino-library","dac"],"created_at":"2026-01-25T13:02:43.761Z","updated_at":"2026-01-25T13:02:43.875Z","avatar_url":"https://github.com/FaultyTwo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MAX51X\nArduino library for MAX517/MAX518/MAX519, 8-bit DAC I2C with R2R Outputs.\n\nFor technical details, please refer to the [datasheet.](https://datasheets.maximintegrated.com/en/ds/MAX517-MAX519.pdf)\n\n## Overview\nMAX51X is  Arduino library for interacting with MAX517/MAX518/MAX519, I2C DAC with R/2R outputs.\n\n**Differences between devices:**\u003cbr\u003e\n- **MAX517**: Only has 1 DAC, reference voltage can be adjusted.\n- **MAX518**: Have 2 DACs, reference voltage is the same as supply voltage for the device.\n- **MAX519**: Have 2 DACs, both reference voltage can be adjusted to each own DAC.\n\n## Analog Output Calculation\nAnalog output can be calculated by using the following formula:\n\nVout : **Vref \\* (DAC_VALUE/256)**\n\n\n## How To Use The Library\nInclude the library, then simply create an object according to each device address, like this:\n```C\n#include \u003cMAX51X.h\u003e\nMAX517 dvc517(0x2F);\nMAX518 dvc518(0x2C);\nMAX519 dvc519(0x27);\n```\n\nTo use this library with other I2C ports, you can simply create a TwoWire object then parse it into the 'begin' function:\n```C\n// ESP32\n#define I2C_SDA 33\n#define I2C_SCL 32\n\nTwoWire esp = TwoWire(0);\nMAX518 dvc518(0x2C);\n\nvoid setup(){\n  esp.begin(I2C_SDA, I2C_SCL, 1000000);\n  dvc518.begin(\u0026esp);\n}\n```\n\n# Methods\n```C\nvoid begin(TwoWire \u0026wirePort = Wire);\n```\nInitiate the MAX51X library.\n\nCan be configured to use other I2C ports from a 'TwoWire' object. For default I2C port, just leave the parameter blank.\n\n```C\nvoid setDac(bool dac, uint8_t data); // FOR MAX518/MAX519\nvoid setDac(uint8_t data); // FOR MAX517\n```\nSet a DAC output.\n\n***For MAX518/MAX519:***\u003cbr\u003e\nUse logic 0 to choose 'DAC0', and use logic 1 to choose 'DAC1'.\n\n**^DAC values shouldn't exceed 255, otherwise it will overflow.**\n\n```C\nvoid setBothDac(uint8_t dac0, uint8_t dac1); // FOR MAX518/MAX519\n```\nSet both DAC outputs at the same time.\n\n**^DAC values shouldn't exceed 255, otherwise it will overflow.**\n\n```C\nvoid powerOff(bool dac); // FOR MAX518/MAX519\nvoid powerOff(); // FOR MAX517\n```\nPower down a DAC.\n\n***For MAX518/MAX519:***\u003cbr\u003e\nUse logic 0 to choose 'DAC0', and use logic 1 to choose 'DAC1'.\n\n```C\nvoid powerOff(bool dac, uint8_t data); // FOR MAX518/MAX519\nvoid powerOff(uint8_t data);; // FOR MAX517\n```\nPower down a DAC and and set the output when power on.\n\n***For MAX518/MAX519:***\u003cbr\u003e\nUse logic 0 to choose 'DAC0', and use logic 1 to choose 'DAC1'.\n\n**^DAC values shouldn't exceed 255, otherwise it will overflow.**\n\n```C\nvoid powerOffBoth(); // FOR MAX518/MAX519\n```\nPower down both DACs at the \"same\" time.\n\n```C\nvoid powerOn(bool dac); // FOR MAX518/MAX519\nvoid powerOn(); // FOR MAX517\n```\nPower on a DAC.\n\n***For MAX518/MAX519:***\u003cbr\u003e\nUse logic 0 to choose 'DAC0', and use logic 1 to choose 'DAC1'.\n\n```C\nvoid powerOnBoth(); // FOR MAX518/MAX519\n```\nPower on both DACs at the \"same\" time.\n\n```C\nvoid resetDac(bool dac); // FOR MAX518/MAX519\nvoid resetDac(); // FOR MAX517\n```\nReset an output of a 'DAC' to zero.\n\n***For MAX518/MAX519:***\u003cbr\u003e\nUse logic 0 to choose 'DAC0', and use logic 1 to choose 'DAC1'.\n\n```C\nvoid resetBothDac(); // FOR MAX518/MAX519\n```\nReset both outputs of DACs to zero.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaultytwo%2Fmax51x-arduino-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaultytwo%2Fmax51x-arduino-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaultytwo%2Fmax51x-arduino-lib/lists"}