« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.2.23 - 1-Wire

This function performs 1-Wire communication.

Firmware 1.17 or higher is required to use this function.

For additional information on how to use this function, please see the 1-Wire App Note

Table 5.2.23-1. 1-Wire Command Response

Command:    
Byte    
0 Csum8  
1 0xF8  
2 0x1D  
3 0x3C  
4 Csum16 L  
5 Csum16 H  
6 Options  
    Bit 0: DPU Control Enable
    Bit 1: DPU Polarity
    Bit 2: DPU Idle
7 Reserved  
8 Sense Pin  
9 DPU Pin  
10 Reserved  
11 ROM Function  
12 ROM0 (LSB)  
13 ROM1  
14 ROM2  
15 ROM3  
16 ROM4  
17 ROM5  
18 ROM6  
19 ROM7 (MSB)  
20 Reserved  
21 Num TX  
22 Reserved  
23 Num RX  
24 TX Byte 0  
...  
63 TX Byte 39  
     
Response:    
Byte    
0 Csum8  
1 0xF8  
2 0x1D  
3 0x3C  
4 Csum16 L  
5 Csum16 H  
6 Error Code  
7 Reserved  
8 Reserved  
9 Warnings  
    Bit 0: No Devices Detected
    Bit 1: Type 1 interrupt (Not Tested)
    Bit 2: Type 2 interrupt (Not Supported)
10 Reserved  
11 Reserved  
16 Data 0  
 
63 Data 47  

Options: This byte provides control of the dynamic pull-up.
Bit 0: enables control of the DPU line.
Bit 1: sets the polarity of the switch. 1 = high on the specified DIO turns the switch on.
Bit 2: sets the idle state. 1 = DPU on while IDLE.
Sense Pin: This is the DIO on the LabJack that is connected to the data line of the 1-wire bus.
DPU Pin: This is the DIO line that will control the dynamic pull-up if enabled in the options byte.
ROM Function: This byte specifies the function to be performed on the 1-wire bus.
ROM[0:7]: This is the ROM of the target device or search path.
Num TX: This is the number of data bytes to transmit.
Num RX: This is the number of data bytes to receive.

Depending on the ROM function used the data returned can have different meanings. Refer to the following table for data definitions.

Table 5.2.23-2.

    Parameter Data Returned  
ROM Function: Number ROM Bytes 0-7 Bytes 8-15
Search ROM 0xF0 List of branches to take. Discovered ROM Code 1s indicate detected branches.
Read ROM 0x33 None ROM read from device  
Match ROM 0x55 The specific ROM    
Skip ROM 0xCC      
Alarm Search 0xEC      

2 comments

This table is confusing because of the two words Dara(=Data?) and Bytes are really the same = Data.

Data 0-7 (bytes 16-23 of the response) returns the discovered ROM

Data 8-15 (bytes 24-31 of the response) returns the branches.

I verified this with two 1-wire devices connected.

Thanks

Hi Jeff,

Thank you for pointing that out. The typo has been fixed.