![Dallas DS1821 Скачать руководство пользователя страница 11](http://html1.mh-extra.com/html/dallas/ds1821/ds1821_manual_3301561011.webp)
DS1821
11 of 18
DS1821 FUNCTION COMMAND SET
Table 4
Command
Description
Protocol
1-Wire Bus Activity
After Command is Issued
TEMPERATURE CONVERSION COMMANDS
Read
Temperature
Reads last converted temperature
value from temperature register.
AAh
Master receives 8-bit temperature
value from DS1821.
Start Convert T Initiates temperature conversions.
EEh
None
Stop Convert T Halts temperature conversions.
22h
None
THERMOSTAT and STATUS/CONFIGURATION COMMANDS
Write TH
Writes data to the T
H
register.
01h
Master transmits 8-bit T
H
value to
DS1821.
Write TL
Writes data to the T
L
register.
02h
Master transmits 8-bit T
L
value to
DS1821.
Read TH
Reads data from the T
H
register.
A1h
Master receives 8-bit T
H
value from
DS1821.
Read TL
Reads data from the T
L
register.
A2h
Master receives 8-bit T
L
value from
DS1821.
Write Status
Writes data to the
status/configuration register.
0Ch
Master transmits 8-bit
status/configuration value to DS1821.
Read Status
Reads data from the
status/configuration register.
ACh
Master receives 8-bit
status/configuration value from
DS1821.
HIGH-RESOLUTION COMMANDS
Read Counter
Reads data from the counter
register
A0h Master
receives
9-bit counter value
from DS1821.
Load Counter
Loads slope accumulator data into
the counter register
41h None
1-Wire SIGNALING
The DS1821 uses a strict 1-Wire communication protocol to insure data integrity. Several signal types are
defined by this protocol: reset pulse, presence pulse, write 0, write 1, read 0, and read 1. All of these
signals, with the exception of the presence pulse, are initiated by the bus master.
INITIALIZATION PROCEDURE: RESET AND PRESENCE PULSES
All communication with the DS1821 begins with an initialization sequence that consists of a reset pulse
from the master followed by a presence pulse from the DS1821. This is illustrated in Figure 7. When the
DS1821 sends the presence pulse in response to the reset, it is indicating to the master that it is on the bus
and ready to operate given an appropriate function command.
During the initialization sequence the bus master transmits (T
X
) the reset pulse by pulling the 1-Wire bus
low for a minimum of 480
μ
s. The bus master then releases the bus and goes into receive mode (R
X
).
When the bus is released, the 5k pullup resistor pulls the 1-Wire bus high. When the DS1821 detects this
rising edge, it waits 15–60
μ
s and then transmits a presence pulse by pulling the 1-Wire bus low for 60–
240
μ
s.