Read One Wire DS2807 eeprom :)

Hi ,
I hope it's going well for you.
I am stuck on a "ONE WIRE DS2807" eeprom reading.
I found a thread about it, but the post was closed.

Lien de la discussion

I contacted the person who started this thread but never got a response.

I would like to read a ONE WIRE DS2807 type eeprom.

Do you have a usable script for this chip?

I tried with other but it doesn't work.

PS: I'm not good on Arduino :slight_smile:

Thank you

Hi,
post the code you already wrote, even if it's not working.

Maybe try with something that does work with plenty of examples like the DS18B20 temperature chip.

If my memory is correct, there is a library for 1-Wire.

If you could master the timing from the datasheet, that might serve you well in the future.

There is a company that specialises in 1-Wire called Embedded Data Systems. They have a lot of useful data sheets and applications.

Hi

I tried a lot of code, I wouldn't even know what to put.

AND for the datasheet I can't find a PDF related to the DS2807.

Yet I searched.

It is attached.
DS28E07DataSheets.pdf (1.1 MB)

You may upload the following sketch and see what ROM Code you get from the EEPROM:

#include<OneWire.h>
OneWire ds(4);   //attach signal pin of EEPROM with DPin-4
byte romCode[8]; //to hold 8-byte ROM Code

void setup()
{
     Serial.begin(9600);
      ds.reset();
      ds.search(romCode);  //LSByte first
      for(int i = 0; i<8; i++)
      {
           byte y = romCode[i];
           if(y < 0x10)
           {
                 Serial.print('0'); //show leading zero 
           }
           Serial.print(y, HEX);
           Serial.print(' ');  //insert space between bytes
      }  
}

Thank you for your help, I have this error message during the compilation :slight_smile:

Arduino : 1.8.19 (Windows 7), Carte : "Arduino Uno"

C:\Users\TFPERF~1\AppData\Local\Temp\ccL0LwF6.ltrans0.ltrans.o: In function `main':

C:\Users\TF PERFORMANCE\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1

Erreur de compilation pour la carte Arduino Uno

Ce rapport pourrait ĂȘtre plus dĂ©taillĂ© avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

Hi, @zingilingiling

At the end of @GolamMostafa code, add;

void loop()
{

}

Tom.. :smiley: :+1: :coffee: :australia:

Thank you TomGeorge

The transfer of the script worked.

Here is the answer I got:

00 00 00 00 00 00 00 00

#include <OneWire.h>
OneWire ds(4);   //attach signal pin of EEPROM with DPin-4
byte romCode[8]; //to hold 8-byte ROM Code

void setup()
{
     Serial.begin(9600);
      ds.reset();
      ds.search(romCode);  //LSByte first
      for(int i = 0; i<8; i++)
      {
           byte y = romCode[i];
           if(y < 0x10)
           {
                 Serial.print('0'); //show leading zero 
           }
           Serial.print(y, HEX);
           Serial.print(' ');  //insert space between bytes
         
      }  
}
void loop()
{

}

Hi

We agree that it is not normal to have only zeros?

Hi

Does the datasheet correspond to the DS2807 chip?

Because the one you provide is for the DS28E07.

I may be wrong.

The EEPROM is supported by OneWire.h Library; therefore, the sketch of post #10 should acquire a realistic (not 0s) 64-bit ROM Code from the chip. I have no chip to test/investigate the effectiveness of the sketch. I just followed DS18B20's philosophy and applied that for DS2807/DS28E07.

Hi

I looked back on the subject, I injected the script of message N° 10 and I have the impression that it passed.

here is the response I get:

2D 11 3D 3D 3E 00 00 2C

is it possible to write on it?

Now, you have been able to communicate with chip. Read the data sheets carefully and exercise the read/write steps until your are successful.

I'm having the same issues with reading all 0s. Could you explain a bit about what you mean with your N° 10 script?

Thanks