Datasheet
DS2482-100: Single-Channel 1-Wire Master
17 of 22
I²C Communication Examples
Device Reset, e.g., After Power-Up
S AD,0 A DRST A Sr AD,1 A <byte> A\ P
This example includes an optional read access to verify the success of the command.
Write Configuration, e.g., Before Starting 1-Wire Activity
Case A: 1-Wire Idle (1WB = 0)
S AD,0 A WCFG A <byte> A Sr AD,1 A <byte> A\ P
This example includes an optional read access to verify the success of the command.
Case B: 1-Wire Busy (1WB = 1)
S AD,0 A WCFG A\ P
The master should stop and restart as soon as the DS2482-100 does not acknowledge the command code.
Set Read Pointer, e.g., to Read from Another Register
Case A: Valid Read Pointer Code
S AD,0 A SRP A C3h A P
C3h is the valid read pointer code for the Configuration register.
Case B: Invalid Read Pointer Code
S AD,0 A SRP A E5h A\ P
E5h is an invalid read pointer code.
1-Wire Reset, e.g., to Begin or End 1-Wire Communication
Case A: 1-Wire Idle (1WB = 0), No Busy Polling to Read the Result
S AD,0 A 1WRS A P (Idle) S AD,1 A <byte> A\ P
In the first cycle, the master sends the command; then the master waits (Idle) for the 1-Wire Reset to complete. In
the second cycle the DS2482-100 is accessed to read the result of the 1-Wire Reset from the Status register.
Case B: 1-Wire Idle (1WB = 0), Busy Polling Until the 1-Wire Command is Completed, then Read the Result
S AD,0 A 1WRS A Sr AD,1 A <byte> A <byte> A\ P
Case C: 1-Wire Busy (1WB = 1)
S AD,0 A 1WRS A\ P
The master should stop and restart as soon as the DS2482-100 does not acknowledge the command code.
Repeat until the 1WB bit has changed to 0.