![Dallas DS1820 Скачать руководство пользователя страница 17](http://html1.mh-extra.com/html/dallas/ds1820/ds1820_instruction_3300589017.webp)
DS1820
021497 17/27
Read Scratchpad [BEh]
This command reads the contents of the scratchpad.
Reading will commence at byte 0, and will continue
through the scratchpad until the 9th (byte–8, CRC) byte
is read. If not all locations are to be read, the master may
issue a reset to terminate reading at any time.
Copy Scratchpad [48h]
This command copies the scratchpad into the E
2
memory of the DS1820, storing the temperature trigger
bytes in nonvolatile memory. If the bus master issues
read time slots following this command, the DS1820 will
output “0” on the bus as long as it is busy copying the
scratchpad to E
2
; it will return a “1” when the copy pro-
cess is complete. If parasite powered, the bus master
has to enable a strong pull–up for at least 10 ms immedi-
ately after issuing this command.
Convert T [44h]
This command begins a temperature conversion. No
further data is required. The temperature conversion will
be performed and then the DS1820 will remain idle. If
the bus master issues read time slots following this com-
mand, the DS1820 will output “0” on the bus as long as it
is busy making a temperature conversion; it will return a
“1” when the temperature conversion is complete. If par-
asite powered, the bus master has to enable a strong
pullup for 500 ms immediately after issuing this com-
mand.
Recall E2 [B8h]
This command recalls the temperature trigger values
stored in E
2
to the scratchpad. This recall operation hap-
pens automatically upon power–up to the DS1820 as
well, so valid data is available in the scratchpad as soon
as the device has power applied. With every read data
time slot issued after this command has been sent, the
device will output its temperature converter busy flag
“0”=busy, “1”=ready.
Read Power Supply [B4h]
With every read data time slot issued after this com-
mand has been sent to the DS1820, the device will sig-
nal its power mode: “0”=parasite power, “1”=external
power supply provided.
READ/WRITE TIME SLOTS
DS1820 data is read and written through the use of time
slots to manipulate bits and a command word to specify
the transaction.
Write Time Slots
A write time slot is initiated when the host pulls the data
line from a high logic level to a low logic level. There are
two types of write time slots: Write One time slots and
Write Zero time slots. All write time slots must be a mini-
mum of 60
µ
s in duration with a minimum of a one
µ
s
recovery time between individual write cycles.
The DS1820 samples the I/O line in a window of 15
µ
s to
60
µ
s after the I/O line falls. If the line is high, a Write One
occurs. If the line is low, a Write Zero occurs (see
Figure 12).
For the host to generate a Write One time slot, the data
line must be pulled to a logic low level and then released,
allowing the data line to pull up to a high level within
15
µ
s after the start of the write time slot.
For the host to generate a Write Zero time slot, the data
line must be pulled to a logic low level and remain low for
60
µ
s.
Read Time Slots
The host generates read time slots when data is to be
read from the DS1820. A read time slot is initiated when
the host pulls the data line from a logic high level to logic
low level. The data line must remain at a low logic level
for a minimum of one
µ
s; output data from the DS1820 is
valid for 15
µ
s after the falling edge of the read time slot.
The host therefore must stop driving the I/O pin low in
order to read its state 15
µ
s from the start of the read slot
(see Figure 12). By the end of the read time slot, the I/O
pin will pull back high via the external pull–up resistor. All
read time slots must be a minimum of 60
µ
s in duration
with a minimum of a one
µ
s recovery time between indi-
vidual read slots.
Figure 13 shows that the sum of T
INIT
, T
RC
, and
T
SAMPLE
must be less than 15
µ
s. Figure 14 shows that
system timing margin is maximized by keeping T
INIT
and T
RC
as small as possible and by locating the master
sample time towards the end of the 15
µ
s period.