This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-open:embeddedcommunicationprotocols2:1wire [2023/08/25 08:40] – ekontoturbo | en:iot-open:embeddedcommunicationprotocols2:1wire [2024/05/27 11:18] (current) – ktokarz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== 1-Wire ===== | + | ====== 1-Wire ====== |
- | 1-Wire is a master-slave communication asynchronous bus interface designed formerly by Dallas Semiconductor Corp((https:// | + | {{: |
+ | 1-Wire is a master-slave communication asynchronous bus interface designed formerly by Dallas Semiconductor Corp((https:// | ||
Each 1-Wire device must contain a logic unit to operate on the bus. A dedicated bus converter is needed to connect a 1-wire bus to a PC. The most popular PC/1-Wire converters use a USB plug to connect to the PC and the RJ11 connectors (telephones 6P2C/6P4C modular plugs) for MicroLAN. 1-Wire devices can also be connected directly to the microcontroller boards. | Each 1-Wire device must contain a logic unit to operate on the bus. A dedicated bus converter is needed to connect a 1-wire bus to a PC. The most popular PC/1-Wire converters use a USB plug to connect to the PC and the RJ11 connectors (telephones 6P2C/6P4C modular plugs) for MicroLAN. 1-Wire devices can also be connected directly to the microcontroller boards. | ||
- | ==== 1-Wire | + | ===Protocol Description === |
Within the MicroLAN, there is always one master device, typically a PC or a microcontroller unit. The master always initiates activity on the bus to avoid collisions on the network chain. If a collision occurs, the master device retries the communication. In the 1-Wire network, many devices can share the same bus line. To identify devices in the MicroLAN, each connected device has a unique 64-bit ID number. The ID number' | Within the MicroLAN, there is always one master device, typically a PC or a microcontroller unit. The master always initiates activity on the bus to avoid collisions on the network chain. If a collision occurs, the master device retries the communication. In the 1-Wire network, many devices can share the same bus line. To identify devices in the MicroLAN, each connected device has a unique 64-bit ID number. The ID number' | ||
The 1-Wire protocol description contains several broadcast commands and commands used to address the selected device. The master sends a selection command, then the address of the selected slave device. This way, the following command is executed only by the addressed device. The 1-Wire bus implements an enumeration procedure that allows the master to get information about the ID numbers of all connected slave devices to the MicroLAN network. The device address includes the device type, identifying what type of slaves are connected to the network chain. The 64-bit address space is searched as a binary tree. It makes it possible to find up to 75 devices per second. | The 1-Wire protocol description contains several broadcast commands and commands used to address the selected device. The master sends a selection command, then the address of the selected slave device. This way, the following command is executed only by the addressed device. The 1-Wire bus implements an enumeration procedure that allows the master to get information about the ID numbers of all connected slave devices to the MicroLAN network. The device address includes the device type, identifying what type of slaves are connected to the network chain. The 64-bit address space is searched as a binary tree. It makes it possible to find up to 75 devices per second. | ||
Line 10: | Line 11: | ||
The physical implementation of the 1-Wire network is based on an open drain master device connected to one or more open drain slaves. One single pull-up resistor for all devices pulls the bus up to 3/5 V and can be used to power the slave devices. 1-Wire communication starts when a master or slave sets the bus to low voltage (connects the pull-up resistor to ground through its output MOSFET). | The physical implementation of the 1-Wire network is based on an open drain master device connected to one or more open drain slaves. One single pull-up resistor for all devices pulls the bus up to 3/5 V and can be used to power the slave devices. 1-Wire communication starts when a master or slave sets the bus to low voltage (connects the pull-up resistor to ground through its output MOSFET). | ||
- | < | + | < |
- | {{ en: | + | {{ en: |
< | < | ||
</ | </ | ||
Line 19: | Line 20: | ||
To find the devices, the enumeration broadcast command must be sent by a master. The slave device responds with all ID bits to the master, and at the end, it returns a 0. | To find the devices, the enumeration broadcast command must be sent by a master. The slave device responds with all ID bits to the master, and at the end, it returns a 0. | ||
- | < | + | Sample 1-Wire timings are present in figures {{ref> |
- | {{ en: | + | |
+ | < | ||
+ | {{ en: | ||
< | < | ||
</ | </ | ||
- | < | + | < |
- | {{ en: | + | {{ en: |
< | < | ||
</ | </ | ||
- | < | + | < |
- | {{ en: | + | {{ en: |
< | < | ||
</ | </ | ||
- | |||
=== 1-Wire Products === | === 1-Wire Products === | ||
- | The Dallas/ | + | The Dallas/ |
* | * | ||
* | * |