{"id":26407232,"url":"https://github.com/blockos/arduino-dataflash","last_synced_at":"2025-03-17T17:29:37.396Z","repository":{"id":656428,"uuid":"299153","full_name":"BlockoS/arduino-dataflash","owner":"BlockoS","description":"Support for Atmel Dataflash for the Arduino","archived":false,"fork":false,"pushed_at":"2024-03-17T18:14:30.000Z","size":835,"stargazers_count":23,"open_issues_count":17,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-03-17T19:28:30.254Z","etag":null,"topics":["arduino","arduino-library","c-plus-plus","dataflash"],"latest_commit_sha":null,"homepage":"http://blockos.github.com/arduino-dataflash","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/BlockoS.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}},"created_at":"2009-09-06T13:46:19.000Z","updated_at":"2024-03-17T19:28:30.255Z","dependencies_parsed_at":"2023-02-16T17:45:40.629Z","dependency_job_id":null,"html_url":"https://github.com/BlockoS/arduino-dataflash","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockoS%2Farduino-dataflash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockoS%2Farduino-dataflash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockoS%2Farduino-dataflash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockoS%2Farduino-dataflash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockoS","download_url":"https://codeload.github.com/BlockoS/arduino-dataflash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244077575,"owners_count":20394324,"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":["arduino","arduino-library","c-plus-plus","dataflash"],"created_at":"2025-03-17T17:29:36.914Z","updated_at":"2025-03-17T17:29:37.388Z","avatar_url":"https://github.com/BlockoS.png","language":"C++","readme":"Arduino DataFlash library\n================================\n\nThis is library adds support for the AT45DB SPI flash memory from Adesto Technology (which bought it from Atmel in 2012).\nAt the moment only the D version is supported.\n\nHardware setup\n-------------------------------\nDataFlash is 5V tolerant but you must power it with 3.3V.\n\n| Signal | Arduino pin  | Dataflash |\n|--------|--------------|-----------|\n|  MISO  |     11       |     1     |\n|  MOSI  |     12       |     8     |\n|  SCK   |     13       |     2     |\n|  SS    |     10       |     4     |\n|  RESET | user defined |     3     |\n|  WP    | user defined |     5     |\n\nSoftware setup\n-------------------------------\nCopy the following filesto your library or sketch folder.\n* DataFlash.cpp\n* DataFlash.h\n* DataFlashCommands.h\n* DataFlashInlines.h\n* DataFlashSizes.h\n\nDataFlash_test.cpp is a simple unit test program. It is built upon the [arduino-tests library](https://github.com/BlockoS/arduino-tests).\nThe /examples/ directory contains some sample sketches.\n\nPlease refer to the [doxygen documentation](http://blockos.github.io/arduino-dataflash/doxygen/html/) for a more detailed API description.\n\nExample\n-------------------------------\nThe following example shows how to write and read on a AT45DB161D DataFlash.\n```cpp\n#include \u003cSPI.h\u003e\n#include \"DataFlash.h\"\n\nstatic const int csPin    = 10;\nstatic const int resetPin = 8;\nstatic const int wpPin    = 7;\n\nDataFlash dataflash;\n\nvoid setup()\n{\n  uint8_t status;\n  DataFlash::ID id;\n\n  const char* dummyMessage = \"Hello world\";\n\n  SPI.begin();\n\n  dataflash.setup(csPin, resetPin, wpPin);\n  dataflash.begin();\n\n  status = dataflash.status();\n  dataflash.readID(id);\n  // For a brand new AT45DB161D dataflash\n  //  status = BIN(00101100)\n  //  id.manufacturer       = 0x1F;\n  //  id.device[0]          = 0x26;\n  //  id.device[1]          = 0x00;\n  //  id.extendedInfoLength = 0x00;\n\n  // Write \"Hello world\" to buffer 1.\n  dataflash.bufferWrite(1, 0);\n  for(int i=0; dummyMessage[i] != '\\0'; i++)\n  {\n    SPI.transfer(dummyMessage[i]);\n  }\n\n  // Transfer buffer 1 to page 7.\n  dataflash.bufferToPage(1, 7);\n\n  // Read page 5.\n  dataflash.pageRead(5, 0);\n  for(int i=0; i\u003cDF_45DB161_PAGESIZE; i++)\n  {\n    uint8_t data = SPI.transfer(0xff);\n  }\n}\n\nvoid loop()\n{\n  // nothing\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockos%2Farduino-dataflash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockos%2Farduino-dataflash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockos%2Farduino-dataflash/lists"}