SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
Although 1-Wire is a byte protocol, there are times when less than a byte must to be written or read. By programming the BSIZE field of the ONEWIRECS register, the number of bits to write and or read in the last byte can be configured. The BSIZE field can be used for a 1-Wire search (enumeration) to allow detect and select processing. Enumeration begins by executing the standard SEARCH (0xF0) command (and if available, the ALARM SEARCH (0xEC)) and then reading two bits for the ID, which is the first bit and its complement. Subsequently, a bit is emitted to select devices with that first matching bit followed by another read of two bits. This process is repeated for up to all 64 bits. To start over, a reset is used. In this way, a tree of IDs can be broken down until one unique ID is left. This can be repeated for each device. The BSIZE field can also be used for non-standard devices which do not fully follow protocol.