thetazzbot / arduino-dataflash Goto Github PK
View Code? Open in Web Editor NEWThis project forked from blockos/arduino-dataflash
Support for Atmel Dataflash for the Arduino
Home Page: http://blockos.github.com/arduino-dataflash
This project forked from blockos/arduino-dataflash
Support for Atmel Dataflash for the Arduino
Home Page: http://blockos.github.com/arduino-dataflash
Arduino DataFlash library ================================ This is library adds support for the AT45DB SPI flash memory from Adesto Technology (which bought it from Atmel in 2012). At the moment only the D version is supported. Hardware setup ------------------------------- DataFlash is 5V tolerant but you must power it with 3.3V. Arduino Dataflash MISO 11 1 MOSI 12 8 SCK 13 2 SS 10 4 RESET user defined 3 WP user defined 5 Software setup ------------------------------- Copy the following filesto your library or sketch folder. * DataFlash.cpp * DataFlash.h * DataFlashCommands.h * DataFlashInlines.h * DataFlashSizes.h DataFlash_test.cpp is a simple unit test program. It is built upon the arduino-tests library (https://github.com/BlockoS/arduino-tests). The /examples/ directory contains some sample sketches. Please refer to the doxygen documentation for a more detailed API description. Example ------------------------------- The following example shows how to write and read on a AT45DB161D DataFlash. #include <SPI.h> #include "DataFlash.h" static const int csPin = 10; static const int resetPin = 8; static const int wpPin = 7; DataFlash dataflash; void setup() { uint8_t status; DataFlash::ID id; const char* dummyMessage = "Hello world"; SPI.begin(); dataflash.setup(csPin, resetPin, wpPin); dataflash.begin(); status = dataflash.status(); dataflash.readID(id); // For a brand new AT45DB161D dataflash // status = BIN(00101100) // id.manufacturer = 0x1F; // id.device[0] = 0x26; // id.device[1] = 0x00; // id.extendedInfoLength = 0x00; // Write "Hello world" to buffer 1. dataflash.bufferWrite(1, 0); for(int i=0; dummyMessage[i] != '\0'; i++) { SPI.transfer(dummyMessage[i]); } // Transfer buffer 1 to page 7. dataflash.bufferToPage(1, 7); // Read page 5. dataflash.pageRead(5, 0); for(int i=0; i<DF_45DB161_PAGESIZE; i++) { uint8_t data = SPI.transfer(0xff); } } void loop() { // nothing }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.