Forum: Mikrocontroller und Digitale Elektronik 1-Wire - Wie schreibe ich 0xE3?


von Dex D. (dexter)


Lesenswert?

Hallo Zusammen,

Ich habe ein Problem mit dem Baustein DS2480 
(http://pdf1.alldatasheet.com/datasheet-pdf/view/58621/DALLAS/DS2480.html).

Und zwar möchte ich die Hexzahl 0xE3 (227) in den Speicher meines 1-Wire 
EEPROMs schreiben. Dies ist allerdings der Ausdruck, dass das schreiben 
beendet ist.
Gibt es da irgendeine Möglichkeit diese Zahl trotzdem zu schreiben? Muss 
doch irgendwie möglich sein...

Gruss Dexter

von Michael E. (rince)


Lesenswert?

Hallo,

Der wichtige Abschnitt des Datenblatts ist dieser hier:

"While being in the Data Mode the DS2480 checks each
byte received from the host for the reserved code that is
used to switch back to Command Mode. To be able to
write any possible code (including the reserved one) to
the 1–Wire bus, the transition to the Command Mode is
as follows: After having received the code for switching
to Command Mode, the device temporarily enters the
Check Mode where it waits for the next byte. If both
bytes are the same, the byte is sent once to the 1–Wire
bus and the device returns to the Data Mode. If the
second byte is different from the reserved code, it will be
executed as command and the device finally enters the
Command Mode. As a consequence, if the reserved
code that normally switches to Command Mode is to be
written to the 1–Wire bus, this code byte must be sent
twice (duplicated). This detail must be considered carefully
when developing software drivers for the DS2480."

D.h. um 0xE3 in den Speicher zu Schreiben musst du das Byte zweimal 
senden. Dadurch erkennt der DS2480 dass es sich nicht um einen Befehl 
sondern um Daten handelt.

Viele Grüsse,

Michael

von Peter D. (peda)


Lesenswert?

Steht doch im Datenblatt:

"To be able to write any possible code (including the reserved one) to 
the 1-Wire bus, the transition to the Command Mode is as follows: After 
having received the code for switching to Command Mode, the device 
temporarily enters the Check Mode where it waits for the next byte. If 
both bytes are the same, the byte is sent once to the 1-Wire bus and the 
device returns to the Data Mode. If the second byte is different from 
the reserved code, it will be executed as command and the device finally 
enters the Command Mode. As a consequence, if the reserved code that 
normally switches to Command Mode is to be written to the 1-Wire bus, 
this code byte must be sent twice (duplicated)."


Peter

von Dex D. (dexter)


Lesenswert?

Vielen Dank für die schnelle Antwort.
Diese Stelle hab ich nicht gesehen im Datenblatt... Wohl überlesen.

Gruss Dexter

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.