![Texas Instruments SimpleLink Ethernet MSP432E401Y Скачать руководство пользователя страница 1502](http://html1.mh-extra.com/html/texas-instruments/simplelink-ethernet-msp432e401y/simplelink-ethernet-msp432e401y_technical-reference-manual_10955781502.webp)
OWIRE
Master
releases
480 µs: Master drives 1-WIRE
240 µs: Slave responds
Functional Description
1502
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
1-Wire Master Module
22.3 Functional Description
1-Wire is a simple single-wire communication interface comprising a wire protocol, transport protocol, and
base session protocols (as well as some basic commands). The wire protocol generates 0 s and 1s by
varying the time the line is held low (it is pulled up by a resistor). The MSP43E microcontroller is the
master and controls the line at all times. A pull-up keeps the line parked high and the microcontroller
driver is assumed to be normal open-drain. No special GPIO configuration is needed here since the open-
drain support is taken care of outside of the microcontroller. See
for pin configuration
information. Data can be both read and written on the same 1-Wire pin. The 1-Wire module supports the
most basic aspects of the protocol, including wire protocol, byte transport control and line reset. Software
is expected to handle the session protocol, including selection of a slave (when more than one is on the
same line) and higher level commands.
NOTE:
All time values by the 1-Wire Master are stated in
μ
s, but the actual time on the wire may be
less by 62.5 ns.
22.3.1 1-Wire Protocol
The 1-Wire protocol signals 1 s and 0 s by holding the line low for varying lengths of time as described
below. For details on the operation of this device, see
Before a command is sent, a reset is
issued on the line. This is a two-part operation:
•
The 1-Wire Master module drives and holds line low for > 480 µs.
•
The controller waits for an answer-to-reset from one or more slaves. A slave signals a reset by pulling
the line low for 60 µs to 240 µs. If the line is not sampled low, there is no slave on the bus and the
NOATR bit is set in the 1-Wire Control and Status (ONEWIRECS) register. An interrupt mask can also
be set to trigger an interrupt on this condition. If the line is sampled low, it indicates there are one or
more slaves on the 1-Wire bus. The Master samples the line some period after releasing the line,
taking into consideration the time needed for the slave to respond. The time from reset release to first
sample is programmed through the ATRSAM bit in the 1-Wire Timing Override (ONEWIRETIM)
register. For example, the Master could sample 10 µs after releasing the reset for 240 µs. Caution
should be exercised to make sure the line has been pulled high (by a pull-up) before the Master
samples to avert a bogus answer-to-reset. Because the slave may hold the line low for a longer
duration than the sample time, the Master must wait for the line to go high before starting a new
command. This reset protocol is used to ensure that all slaves are in a known state.
shows the details of the 1-wire reset.
Figure 22-2. 1-Wire Reset Protocol
If the Master is transmitting data to the slave, the signalling is as follows:
•
A 1 is signaled by the master driving and holding the line low for < 15 µs. Generally, about 6 µs is used
for normal mode. The slave samples and measures the signal from falling edge and checks the line 15
µs later (or more). If line has reverted to high, the slave registers a 1 value.
•
A 0 is signaled by the Master driving and holding the line low for 60 µs or more. Although the slave
reads just past 15 µs, the normal mode requires the line to be low for 60 µs. If the line is still low after