1-Wire is a Dallas (now Maxim) proprietary protocol used by the ubiquitous DS18x20 (DS1820, DS18S20, DS18B20), iButton (contact access chips) and other devices.
The bus uses two wires, Data and GND. A third, Vdd wire, is optional and can be left out for parasitic power from the Data line. See the DS18x20 datasheet for more details.
1-Wire requires precise timing and is implemented by bit-banging in GEX. GEX also implements the Search algorithm for finding all devices connected to the bus. Each device has a unique address, which are found using a form of binary search with hardware support in the individual devices.
The search algorithm is available in a separate repository for easier re-use in other projects: MightyPork/1wire-search.
Test if there are any devices attached to the bus.
Start the search algorithm, looking for all devices.
Up to 32 devices can be found in one call. To find more, use the
SEARCH_CONTINUEshould be used.
SEARCH_ADDR (see above), except only devices with
an active Alarm status are detected. This is used with thermometers
which can detect the temperature exceeding pre-selected limits.
Continue a search (address or alarm). The report format is identical
SEARCH_ADDR, but continues after the last reported address.
Read the address of the single device connected to the bus. If more than one device is connected, this will likely fail due to a checksum mismatch.
Write bytes to the bus.
Send a query and read bytes from the bus.
Wait for a READY status (used in DS18x20 measurements).
NOTE: Not available if parasitic power is used, then it just waits the maximal measurement time of DS1820.
A response is issued after all devices are done measuring, or a timeout error is returned.
No events defined for this unit type.