pceric / dallaseprom Goto Github PK
View Code? Open in Web Editor NEWArduino library for Dallas 1-Wire (E)EPROMs
License: GNU Lesser General Public License v2.1
Arduino library for Dallas 1-Wire (E)EPROMs
License: GNU Lesser General Public License v2.1
Hi,
Still I couldn't get it works.
I made several changes and added several function were missing .. Please let me know how I can send you the changes?
Ok, I send the files using this forum. Please take care of the changes.
Regards,
Mariwan
Hi,
Thank you for this great library.
I have a problem regarding writing on the mentioned device. Looking at the datasheet, it says that you should send a command byte which I cannot find it in your code. Bellow is from the datasheet.
COPY SCRATCHPAD [55h]
After the data stored in the scratchpad has been verified the master may send the Copy Scratchpad command followed by a validation key of A5h to transfer data from the scratchpad to the EEPROM memory. This command always copies the data of the entire scratchpad. >
I get error code -5
And when I write the 32 bytes, the last byte get zero al the time .. I send 0x02.
Do you have any suggestion?
Hey pceric,
So i have been attempting to use your library to read from a DS2506 so I included it in the structure. However, when I was attempting to read from it, I kept getting a CRC error and its because after the write command sends for the third time (Read status, then TA1, then TA2), the expected OneWire read command will retrieve the DATA sent from the status memory and not the CRC. If there is no master reset, then the CRC will be generated. Just thought that I would point this out to you!
To summarize,
_wire->reset();
_wire->select(_addr);
_wire->write(command[0]);
_wire->write(command[1]);
_wire->write(command[2]);
int read1 = _wire->read();
int crc_main = OneWire::crc16(command, 3);
Serial.println(read1);
Serial.println(crc_main);
if (crc_main != read1)//(OneWire::crc16(command, 3)!=_wire->read())
return CRC_MISMATCH;
Since my chip is unprogrammed, the read1 will produce 255 (or 0xFF as expected) and the CRC will generate 16 thousand something. So, There really isn't a crc mismatch. Thanks for the hard work you put in! Its a great library just thought I would point out this error for you! And yes this is the same memory read function for the other DS25xx series EPROMS.
Thanks again!
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.