1-Wire - Wie schreibe ich 0xE3?

OP #2579935
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
#2579953
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
#2579954
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

Antwort schreiben

Hinweis: der ursprüngliche Beitrag ist mehr als 6 Monate alt. Bitte hier nur auf die ursprüngliche Frage antworten, für neue Fragen einen neuen Beitrag erstellen.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.